/* =========================================
   N.C Scores - High-End Store Theme
   Refined for Elegance and Clarity
   ========================================= */

/* Color Variables */
:root {
    --deep-violet: #0F172A; /* Rich Navy */
    --neon-purple: #D4AF37; /* Metallic Gold */
    --true-black: #020617; /* Darker Navy/Black */
    --glass-white: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    background-color: var(--deep-violet); /* Prevent white flash */
}

body {
    background-color: var(--deep-violet);
    background: linear-gradient(135deg, var(--deep-violet) 0%, var(--true-black) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    overflow-x: hidden;
}

/* Glassmorphism Refined */
.glass-obsidian {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glass-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.15); /* Subtle Gold Border */
    border-radius: 8px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(212, 175, 55, 0.4); /* Gold Border on Hover */
}

/* Gold Text Effects */
.text-neon {
    color: var(--neon-purple);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.glow-border {
    box-shadow:
        0 0 15px rgba(212, 175, 55, 0.2),
        inset 0 0 15px rgba(212, 175, 55, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}

/* Typography */
.font-serif {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

/* Legacy Font Mappings */
.font-creep {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.05em;
}
.font-ui {
    font-family: 'Inter', sans-serif;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #D4AF37, #B4941F); /* Gold Gradient */
    color: #0F172A; /* Dark Text on Gold */
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #FFD700, #DAA520);
}

/* Form Controls */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23D4AF37' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(15, 23, 42, 0.6);
    color: white;
}

select option {
    background-color: var(--deep-violet);
    color: white;
    padding: 10px;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-purple);
    color: var(--neon-purple);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s ease;
}

.mobile-nav-item.active {
    color: var(--neon-purple);
}

.mobile-nav-item:hover {
    color: white;
}

/* Desktop Navigation */
.desktop-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Score Card */
.score-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.score-card:hover::before {
    opacity: 0.9;
}

.score-card img {
    transition: transform 0.5s ease;
}

.score-card:hover img {
    transform: scale(1.05);
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(135deg, #D4AF37, #B4941F);
    color: #0F172A;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg,
            rgba(15, 23, 42, 0.4) 0%,
            rgba(15, 23, 42, 0.6) 50%,
            rgba(15, 23, 42, 0.4) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Audio Player Glow */
.progress-glow {
    position: absolute;
    height: 100%;
    background: var(--neon-purple);
    box-shadow: 0 0 10px var(--neon-purple);
    border-radius: inherit;
    transition: width 0.1s linear;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Utility Classes */
.blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.inner-shadow {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.outer-glow {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    body {
        padding-bottom: 5rem;
        /* Space for mobile nav */
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--neon-purple);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--neon-purple);
    color: #0F172A;
}

/* Custom Toast Notifications */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    color: white;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}
.custom-toast.hiding { animation: slideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.custom-toast-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.custom-toast.success .custom-toast-icon { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.custom-toast.error .custom-toast-icon { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.custom-toast.warning .custom-toast-icon { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.custom-toast.info .custom-toast-icon { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.custom-toast-content { flex: 1; }
.custom-toast-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; font-family: 'Cinzel', serif; }
.custom-toast-message { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); }
.custom-toast-close { background: transparent; border: none; color: rgba(255, 255, 255, 0.4); cursor: pointer; padding: 4px; border-radius: 50%; transition: all 0.2s; }
.custom-toast-close:hover { background: rgba(255, 255, 255, 0.1); color: white; }

@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
