/* Custom CSS for Backyard */

/* Theme variables will be injected dynamically */
:root {
    --bg: #ffffff;
    --text: #000000;
    --accent: #3b82f6;
    --card: #f8fafc;
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Theme-specific styles */
[data-theme] {
    background: var(--bg);
    color: var(--text);
}

[data-theme] .theme-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme] .theme-accent {
    color: var(--accent);
}

[data-theme] .theme-bg {
    background: var(--bg);
}

[data-theme] .theme-text {
    color: var(--text);
}

/* Animations */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    animation: sparkle 2s infinite;
}

@keyframes hoverGlow {
    0% { box-shadow: 0 0 5px var(--accent); }
    50% { box-shadow: 0 0 20px var(--accent), 0 0 30px var(--accent); }
    100% { box-shadow: 0 0 5px var(--accent); }
}

.hover-glow:hover {
    animation: hoverGlow 1s ease-in-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--card);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    opacity: 0.8;
}

/* Profile specific styles */
.profile-container {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
}

.profile-section {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-section h2 {
    font-family: var(--heading-font, 'Poppins');
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

/* Link styles */
.profile-link {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    background: var(--card);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-link:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image grid */
.image-grid {
    display: grid;
    gap: 16px;
}

.image-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.image-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.image-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .image-grid-3,
    .image-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

/* Moodboard grid */
.moodboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.moodboard-item {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

.moodboard-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.moodboard-item:hover img {
    transform: scale(1.05);
}

/* Countdown widget */
.countdown-widget {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    font-family: 'Inter', monospace;
}

/* Now playing widget */
.now-playing {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.now-playing img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.now-playing-info h3 {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.now-playing-info p {
    font-size: 0.875rem;
    opacity: 0.75;
    color: var(--text);
}

/* Form styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent);
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive design */
@media (max-width: 640px) {
    .profile-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .profile-section h2 {
        font-size: 1.25rem;
    }
    
    .image-grid-2,
    .image-grid-3,
    .image-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .moodboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .sparkle,
    .hover-glow,
    .image-item img,
    .moodboard-item img {
        animation: none;
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .profile-section {
        border: 2px solid var(--text);
    }
    
    .profile-link {
        border: 2px solid var(--text);
    }
}

/* Print styles */
@media print {
    .profile-container {
        background: white !important;
        color: black !important;
    }
    
    .profile-section {
        background: white !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}
