/* Coraline's Other World Theme - A darkly whimsical journey */

@@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Griffy:wght@400&family=Kalam:wght@300;400;700&display=swap');

:root {
    --theme-background: var(--palette-background, #0a0f1a);
    --theme-surface: var(--palette-surface, #1a2332);
    --theme-foreground: var(--palette-foreground, #e8d5c4);
    --theme-muted: var(--palette-muted, #8b7355);
    --theme-accent: var(--palette-accent, #ff6b9d);
    --theme-accent-alt: var(--palette-accent-alt, #4ecdc4);
    
    /* Extended Coraline palette */
    --coraline-button-blue: #2c5aa0;
    --coraline-button-shadow: #1a3660;
    --coraline-otherworld-purple: #6b46c1;
    --coraline-otherworld-purple-light: #8b5cf6;
    --coraline-danger-red: #dc2626;
    --coraline-cat-black: #111827;
    --coraline-yellow: #fbbf24;
    --coraline-green: #10b981;
}

/* Custom fonts */
body {
    font-family: 'Kalam', cursive, system-ui;
    background: var(--theme-background);
    color: var(--theme-foreground);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 157, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(78, 205, 196, 0.05) 0%, transparent 50%);
    background-attachment: fixed;
    position: relative;
}

/* Mystical floating buttons animation - REMOVED CSS-based background patterns that were creating purple rectangles */
/* The floating button effects are now handled entirely by JavaScript in theme.js */

/* Removed coralineFloat keyframes - no longer needed without CSS background patterns */

/* Header styling */
.site-header {
    background: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--coraline-otherworld-purple);
    box-shadow: 0 4px 20px rgba(107, 70, 193, 0.3);
}

.brand-mark {
    font-family: 'Griffy', cursive;
    font-size: 1.6rem !important;
    background: linear-gradient(45deg, var(--theme-accent), var(--theme-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.5);
    position: relative;
}

.brand-icon {
    filter: drop-shadow(0 0 10px var(--theme-accent));
}

/* Navigation enhancements */
.site-nav a {
    transition: all 0.3s ease;
    position: relative;
}

.site-nav a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-alt));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.site-nav a:hover::before {
    width: 100%;
}

.site-nav .admin-link {
    background: linear-gradient(135deg, var(--coraline-otherworld-purple), var(--coraline-otherworld-purple-light));
    border: 2px solid var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}

.site-nav .admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(255, 107, 157, 0.6);
}

/* Hero section - The Other World Portal */
.hero {
    background: linear-gradient(135deg, 
        rgba(107, 70, 193, 0.8), 
        rgba(255, 107, 157, 0.6), 
        rgba(78, 205, 196, 0.4));
    border: 3px solid var(--theme-accent);
    position: relative;
    overflow: hidden;
}

/* Remove the CSS-based Coraline animation - now handled by JavaScript */

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 1px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 1px, transparent 2px);
    background-size: 30px 30px, 50px 50px;
    animation: buttonPattern 15s linear infinite;
    pointer-events: none;
    z-index: 2; /* Between Coraline and content */
}

@@keyframes buttonPattern {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

.hero-content {
    position: relative;
    z-index: 3; /* Increased to stay above Coraline */
}

.hero-title {
    font-family: 'Griffy', cursive;
    text-shadow: 3px 3px 0 var(--coraline-cat-black), 
                 0 0 30px rgba(255, 107, 157, 0.8);
    animation: coralineGlow 3s ease-in-out infinite alternate;
}

@@keyframes coralineGlow {
    0% { text-shadow: 3px 3px 0 var(--coraline-cat-black), 0 0 30px rgba(255, 107, 157, 0.8); }
    100% { text-shadow: 3px 3px 0 var(--coraline-cat-black), 0 0 50px rgba(78, 205, 196, 1); }
}

/* Albums and Cards - Button-like design */
.album-card, .media-card {
    background: linear-gradient(145deg, var(--theme-surface), #243142);
    border: 2px solid var(--coraline-button-blue);
    border-radius: 20px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 20px rgba(44, 90, 160, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.album-card::before, .media-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--theme-accent) 2px, transparent 3px);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.album-card:hover, .media-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--theme-accent);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 107, 157, 0.6);
}

.album-card:hover::before, .media-card:hover::before {
    opacity: 0.3;
    width: 200px;
    height: 200px;
}

/* Album covers with mystical effects */
.album-cover {
    position: relative;
    overflow: hidden;
}

.album-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 107, 157, 0.2) 50%, 
        transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.album-card:hover .album-cover::after {
    transform: translateX(100%);
}

/* Section headers with Coraline flair */
.section-title {
    font-family: 'Griffy', cursive;
    background: linear-gradient(45deg, var(--theme-accent), var(--theme-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    text-align: center;
    margin-bottom: 2rem;
}

.section-title::before, .section-title::after {
    content: '👁';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.7;
    animation: coralineEyes 4s ease-in-out infinite;
}

.section-title::before {
    left: -3rem;
}

.section-title::after {
    right: -3rem;
}

@@keyframes coralineEyes {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
}

/* Buttons with Other World styling */
.admin-primary, .btn-primary, .hero-cta, .album-link {
    background: linear-gradient(135deg, var(--theme-accent), var(--coraline-otherworld-purple));
    border: 2px solid var(--theme-accent-alt);
    border-radius: 25px;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}

.admin-primary::before, .btn-primary::before, .hero-cta::before, .album-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.admin-primary:hover, .btn-primary:hover, .hero-cta:hover, .album-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
}

.admin-primary:hover::before, .btn-primary:hover::before, 
.hero-cta:hover::before, .album-link:hover::before {
    width: 300px;
    height: 300px;
}

/* Lightbox with otherworldly styling */
#lightbox-container {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(10px);
}

.lightbox-content {
    border: 3px solid var(--theme-accent);
    border-radius: 20px;
    background: linear-gradient(145deg, var(--theme-surface), #243142);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(255, 107, 157, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.lightbox-close {
    background: linear-gradient(135deg, var(--coraline-danger-red), #ef4444);
    border: 2px solid var(--theme-accent);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--coraline-danger-red);
}

.nav-btn {
    background: linear-gradient(135deg, var(--coraline-otherworld-purple), var(--coraline-otherworld-purple-light));
    border: 2px solid var(--theme-accent-alt);
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-alt));
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
}

/* Filter buttons */
.filter-button {
    background: linear-gradient(135deg, var(--theme-surface), #243142);
    border: 2px solid var(--coraline-button-blue);
    color: var(--theme-foreground);
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.filter-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--coraline-button-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.filter-button.is-active {
    background: linear-gradient(135deg, var(--theme-accent), var(--coraline-otherworld-purple));
    border-color: var(--theme-accent-alt);
    color: white;
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.5);
}

.filter-button.is-active::before {
    background: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.filter-button:hover {
    transform: translateY(-2px);
    border-color: var(--theme-accent);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

/* Admin areas */
.admin-shell, .admin-card, .admin-panel {
    background: linear-gradient(145deg, var(--theme-surface), #243142);
    border: 2px solid var(--coraline-otherworld-purple);
    border-radius: 25px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(107, 70, 193, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Form inputs */
.admin-form input, .admin-form textarea, 
.admin-inline-form input, .admin-inline-form textarea, 
.admin-inline-form select {
    background: rgba(26, 35, 50, 0.7);
    border: 2px solid var(--coraline-button-blue);
    border-radius: 15px;
    color: var(--theme-foreground);
    transition: all 0.3s ease;
}

.admin-form input:focus, .admin-form textarea:focus,
.admin-inline-form input:focus, .admin-inline-form textarea:focus,
.admin-inline-form select:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 15px rgba(255, 107, 157, 0.4);
    outline: none;
}

/* Empty states */
.empty-state {
    background: linear-gradient(145deg, rgba(26, 35, 50, 0.5), rgba(36, 49, 66, 0.5));
    border: 2px dashed var(--coraline-otherworld-purple);
    border-radius: 20px;
    position: relative;
}

.empty-state::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    border-radius: 18px;
}

/* Video overlay enhancements */
.video-overlay {
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(107, 70, 193, 0.4));
    backdrop-filter: blur(2px);
}

.play-icon {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.8));
    animation: coralinePulse 2s ease-in-out infinite;
}

@@keyframes coralinePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Footer styling */
.site-footer {
    background: linear-gradient(135deg, rgba(26, 35, 50, 0.8), rgba(17, 24, 39, 0.8));
    border-top: 2px solid var(--coraline-otherworld-purple);
    box-shadow: 0 -4px 20px rgba(107, 70, 193, 0.2);
}

/* Responsive adjustments */
@@media (max-width: 768px) {
    .section-title::before, .section-title::after {
        display: none;
    }
    
    /* Removed body::before opacity rule - no longer needed */
    
    .hero {
        margin: 1rem;
    }
    
    /* Adjust Coraline size for mobile */
    .hero::before {
        width: 120px;
        left: -120px;
        animation: coralineSlideMobile 20s ease-in-out infinite;
    }
    
    .album-card:hover, .media-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
}

@@keyframes coralineSlideMobile {
    0% { left: -120px; }
    25% { left: calc(50% - 60px); opacity: 0.3; }
    50% { left: calc(100% - 120px); opacity: 0.25; }
    75% { left: calc(50% - 60px); opacity: 0.3; }
    100% { left: -120px; opacity: 0.25; }
}

/* Special effects for theme switching */
.theme-transition {
    animation: coralineMagic 1s ease-out;
}

@@keyframes coralineMagic {
    0% { 
        filter: blur(5px) brightness(1.2);
        transform: scale(0.95);
    }
    50% { 
        filter: blur(2px) brightness(1.5);
        transform: scale(1.02);
    }
    100% { 
        filter: blur(0) brightness(1);
        transform: scale(1);
    }
}

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

::-webkit-scrollbar-track {
    background: var(--theme-background);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--theme-accent), var(--coraline-otherworld-purple));
    border-radius: 6px;
    border: 2px solid var(--theme-background);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--theme-accent-alt), var(--coraline-otherworld-purple-light));
}
