/**
 * All Star Tower Defense X Tier List - Main Stylesheet
 * Version: 2.1.0
 * Last Updated: July 21, 2025
 */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Primary Colors */
    --primary-color: #6366F1;
    --secondary-color: #8B5CF6;
    --accent-color: #F59E0B;
    
    /* Gradient Colors */
    --gradient-from: #667EEA;
    --gradient-to: #764BA2;
    
    /* Tier Colors */
    --tier-s-from: #ff6b6b;
    --tier-s-to: #ee5a24;
    --tier-s-shadow: rgba(255, 107, 107, 0.3);
    
    --tier-a-from: #feca57;
    --tier-a-to: #ff9ff3;
    --tier-a-shadow: rgba(254, 202, 87, 0.3);
    
    --tier-b-from: #48dbfb;
    --tier-b-to: #0abde3;
    --tier-b-shadow: rgba(72, 219, 251, 0.3);
    
    --tier-c-from: #1dd1a1;
    --tier-c-to: #10ac84;
    --tier-c-shadow: rgba(29, 209, 161, 0.3);
    
    --tier-d-from: #a4b0be;
    --tier-d-to: #747d8c;
    --tier-d-shadow: rgba(164, 176, 190, 0.3);
    
    /* Typography */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: var(--font-family-base);
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== UTILITY CLASSES ===== */
.gradient-bg {
    background: linear-gradient(135deg, var(--gradient-from) 0%, var(--gradient-to) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== TIER STYLES ===== */
.tier-s {
    background: linear-gradient(135deg, var(--tier-s-from) 0%, var(--tier-s-to) 100%);
    box-shadow: 0 10px 25px var(--tier-s-shadow);
    color: white;
}

.tier-a {
    background: linear-gradient(135deg, var(--tier-a-from) 0%, var(--tier-a-to) 100%);
    box-shadow: 0 10px 25px var(--tier-a-shadow);
    color: white;
}

.tier-b {
    background: linear-gradient(135deg, var(--tier-b-from) 0%, var(--tier-b-to) 100%);
    box-shadow: 0 10px 25px var(--tier-b-shadow);
    color: white;
}

.tier-c {
    background: linear-gradient(135deg, var(--tier-c-from) 0%, var(--tier-c-to) 100%);
    box-shadow: 0 10px 25px var(--tier-c-shadow);
    color: white;
}

.tier-d {
    background: linear-gradient(135deg, var(--tier-d-from) 0%, var(--tier-d-to) 100%);
    box-shadow: 0 10px 25px var(--tier-d-shadow);
    color: white;
}

/* ===== COMPONENT STYLES ===== */

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

/* Tier Cards */
.tier-card {
    transition: all var(--transition-normal);
    cursor: pointer;
}

.tier-card:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Navigation */
.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* ===== TEXT UTILITIES ===== */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f5f9;
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
    :root {
        font-size: 14px;
    }
    
    .tier-card:hover {
        transform: translateY(-2px) scale(1.02);
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .gradient-bg,
    .tier-s,
    .tier-a,
    .tier-b,
    .tier-c,
    .tier-d {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .nav-link,
    .btn {
        color: black !important;
        background: white !important;
        border: 1px solid black !important;
    }
}
