/* Duet Night Abyss - Main Stylesheet */
/* Last Updated: November 1, 2025 */

/* ========================================
   CSS Variables (Design System)
   ======================================== */

:root {
    /* Colors - Dark Fantasy + Cyberpunk Theme */
    --color-dark-1: #0A0E27;
    --color-dark-2: #1A1F3A;
    --color-purple: #2D1B69;
    --color-blue: #4A90E2;
    --color-cyan: #00D9FF;
    --color-magenta: #FF006E;
    --color-gold: #FFD700;
    
    /* Text Colors */
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #E0E0E0;
    --color-text-muted: #9CA3AF;
    
    /* Spacing */
    --spacing-xs: 0.25rem;  /* 4px */
    --spacing-sm: 0.5rem;   /* 8px */
    --spacing-md: 1rem;     /* 16px */
    --spacing-lg: 2rem;     /* 32px */
    --spacing-xl: 4rem;     /* 64px */
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-glow-cyan: 0 0 20px rgba(0, 217, 255, 0.3);
    --shadow-glow-magenta: 0 0 20px rgba(255, 0, 110, 0.3);
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: linear-gradient(to bottom, var(--color-dark-1), var(--color-dark-2));
    min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem; /* 40px */
}

h2 {
    font-size: 2rem; /* 32px */
}

h3 {
    font-size: 1.5rem; /* 24px */
}

h4 {
    font-size: 1.25rem; /* 20px */
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-magenta);
}

/* ========================================
   Components
   ======================================== */

/* Card Component */
.card {
    background: var(--color-dark-2);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: rgba(0, 217, 255, 0.5);
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-2px);
}

/* Button Component */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(to right, var(--color-blue), var(--color-cyan));
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-blue);
    color: var(--color-blue);
}

.btn-secondary:hover {
    background: var(--color-blue);
    color: white;
}

/* Section Header Component */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header::after {
    content: '';
    display: block;
    width: 5rem;
    height: 0.25rem;
    background: linear-gradient(to right, var(--color-blue), var(--color-cyan));
    border-radius: 2px;
}

/* ========================================
   Utility Classes
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }

.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }

/* ========================================
   Loading States
   ======================================== */

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-cyan);
    outline-offset: 2px;
}

/* ========================================
   Animations & Visual Effects
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-normal) ease-out;
}

/* Glow animation for text */
@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.5)) 
                drop-shadow(0 0 20px rgba(0, 217, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.8)) 
                drop-shadow(0 0 40px rgba(0, 217, 255, 0.5));
    }
}

.animate-glow {
    animation: glow 3s ease-in-out infinite;
}

/* Slow pulse animation */
@keyframes pulseSlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

/* Drop shadow glow effects */
.drop-shadow-glow {
    filter: drop-shadow(0 0 10px rgba(0, 217, 255, 0.6)) 
            drop-shadow(0 0 20px rgba(0, 217, 255, 0.3));
}

/* Box shadow glow effects - Cyan */
.shadow-glow-cyan {
    box-shadow: 
        0 0 20px rgba(0, 217, 255, 0.3),
        0 0 40px rgba(0, 217, 255, 0.2),
        inset 0 0 20px rgba(0, 217, 255, 0.1);
}

.shadow-glow-cyan-lg {
    box-shadow: 
        0 0 30px rgba(0, 217, 255, 0.5),
        0 0 60px rgba(0, 217, 255, 0.3),
        0 0 90px rgba(0, 217, 255, 0.2),
        inset 0 0 30px rgba(0, 217, 255, 0.2);
}

/* Box shadow glow effects - Magenta */
.shadow-glow-magenta {
    box-shadow: 
        0 0 20px rgba(255, 0, 110, 0.3),
        0 0 40px rgba(255, 0, 110, 0.2),
        inset 0 0 20px rgba(255, 0, 110, 0.1);
}

.shadow-glow-magenta-lg {
    box-shadow: 
        0 0 30px rgba(255, 0, 110, 0.5),
        0 0 60px rgba(255, 0, 110, 0.3),
        0 0 90px rgba(255, 0, 110, 0.2),
        inset 0 0 30px rgba(255, 0, 110, 0.2);
}

/* Floating particles animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-40px) translateX(-10px);
    }
    75% {
        transform: translateY(-20px) translateX(10px);
    }
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #00D9FF, #FF006E);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s ease-in-out infinite;
}

.particle-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle-2 {
    top: 40%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particle-3 {
    top: 60%;
    left: 30%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle-4 {
    top: 80%;
    left: 70%;
    animation-delay: 6s;
    animation-duration: 20s;
}

.particle-5 {
    top: 30%;
    left: 50%;
    animation-delay: 3s;
    animation-duration: 16s;
}

/* ========================================
   Tier List Styles
   ======================================== */

/* Tier Badges */
.tier-badge-s {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #0A0E27;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.tier-badge-a {
    background: linear-gradient(135deg, #FF006E 0%, #C13584 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

.tier-badge-b {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

.tier-badge-c {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    color: white;
    box-shadow: 0 0 20px rgba(107, 114, 128, 0.3);
}

/* Filter Buttons */
.filter-btn {
    background: var(--color-dark-2);
    border: 2px solid rgba(74, 144, 226, 0.3);
    color: var(--color-text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
    background: rgba(0, 217, 255, 0.1);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    border-color: var(--color-cyan);
    color: white;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

/* Character Cards */
.character-card {
    position: relative;
    transition: all var(--transition-normal) ease;
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.3);
}

/* Text Truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   Back to Top Button
   ======================================== */

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-blue));
    border: 2px solid rgba(0, 217, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: linear-gradient(135deg, var(--color-blue), var(--color-magenta));
    border-color: rgba(255, 0, 110, 0.8);
    box-shadow: 0 8px 20px rgba(255, 0, 110, 0.5);
    transform: translateY(-4px);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Mobile: smaller button */
@media (max-width: 768px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    #back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */

.breadcrumb {
    background: rgba(26, 31, 58, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    padding: 0.75rem 0;
}

.breadcrumb nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.breadcrumb a:hover {
    color: var(--color-cyan);
}

.breadcrumb a svg {
    width: 14px;
    height: 14px;
}

.breadcrumb-separator {
    color: var(--color-text-muted);
    user-select: none;
}

.breadcrumb-current {
    color: var(--color-cyan);
    font-weight: 600;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
    
    #back-to-top {
        display: none !important;
    }
    
    .breadcrumb {
        display: none !important;
    }
}

