/* ===== YU-GI-OH! CENTER - ANCIENT EGYPTIAN THEME ===== */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Ancient Egyptian Color Palette */
    --primary-color: #ffd700;      /* Gold */
    --primary-dark: #ffb300;       /* Dark Gold */
    --secondary-color: #8b4513;    /* Saddle Brown */
    --secondary-dark: #654321;     /* Dark Brown */
    --accent-color: #cd853f;       /* Peru */
    --accent-light: #daa520;       /* Goldenrod */
    
    /* Background Colors - Ancient Egyptian Dark */
    --bg-primary: #1a0f0f;        /* Very Dark Brown */
    --bg-secondary: #2d1b1b;      /* Dark Brown */
    --bg-tertiary: #3d2b2b;       /* Medium Brown */
    --bg-card: #2a1a1a;           /* Card Background */
    --bg-overlay: rgba(26, 15, 15, 0.95);
    
    /* Text Colors */
    --text-primary: #ffffff;       /* White */
    --text-secondary: #f5deb3;     /* Wheat */
    --text-muted: #d2b48c;        /* Tan */
    --text-accent: #ffd700;       /* Gold */
    
    /* Border Colors */
    --border-primary: #8b4513;     /* Saddle Brown */
    --border-secondary: #a0522d;   /* Sienna */
    --border-accent: #ffd700;      /* Gold */
    
    /* Shadow Colors */
    --shadow-light: rgba(255, 215, 0, 0.1);
    --shadow-medium: rgba(255, 215, 0, 0.2);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    
    /* Gradients - Ancient Egyptian */
    --gradient-primary: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    --gradient-secondary: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    --gradient-tertiary: linear-gradient(135deg, #4b0082 0%, #6a0dad 100%);
    --gradient-dark: linear-gradient(135deg, #1a0f0f 0%, #2d1b1b 100%);
    --gradient-card: linear-gradient(135deg, #2a1a1a 0%, #3d2b2b 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Typography */
    --font-primary: 'Orbitron', 'Arial', sans-serif;
    --font-secondary: 'Roboto', 'Arial', sans-serif;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    
    /* Status Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    padding-top: 80px; /* Add padding to prevent content from going under fixed header */
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    height: 80px;
}

.header.scrolled {
    background: var(--bg-primary);
    box-shadow: 0 4px 20px var(--shadow-heavy);
}

.navbar {
    height: 100%;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.brand-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Hide brand text on mobile devices */
@media (max-width: 768px) {
    .brand-text {
        display: none;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(255, 215, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: none;
    border: none;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
    margin-top: -80px; /* Compensate for body padding */
    padding-top: 80px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    margin-bottom: var(--spacing-lg);
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    transition: transform var(--transition-normal);
}

.hero-image:hover {
    transform: scale(1.05);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.card-item {
    will-change: transform;
}

.hero-image {
    will-change: transform;
}

.modal-content {
    will-change: transform, opacity;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    .hero {
        padding-top: 100px; /* Add extra padding on mobile */
        margin-top: -100px; /* Compensate for the extra padding */
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
        padding: var(--spacing-lg) var(--spacing-md); /* Add top/bottom padding */
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .hero-visual {
        height: 300px;
        order: -1;
    }
    
    .hero-image {
        max-width: 80%;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .card-item {
        padding: 0.75rem;
    }
    
    .card-image-container {
        margin-bottom: 0.75rem;
    }
    
    .card-info {
        gap: 0.5rem;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 120px; /* Even more padding for small screens */
        margin-top: -120px;
    }
    
    .hero-container {
        padding: var(--spacing-xl) var(--spacing-sm); /* More padding on small screens */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .hero-visual {
        height: 250px;
    }
    
    .hero-image {
        max-width: 90%;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .card-item {
        padding: 0.5rem;
    }
    
    .card-image {
        height: 240px;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
}

.btn-tertiary {
    background: var(--gradient-tertiary);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(75, 0, 130, 0.3);
}

.btn-tertiary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 0, 130, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

/* ===== CARDS & GRIDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.card-item {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border-primary);
    position: relative;
    overflow: hidden;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.card-item:hover::before {
    transform: scaleX(1);
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    border-color: var(--accent-primary);
}

.card-image-container {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-item:hover .card-image {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-item:hover .card-overlay {
    opacity: 1;
}

.card-overlay i {
    color: white;
    font-size: 2rem;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.card-metadata {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-secondary);
}

.card-metadata div {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}

.card-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-secondary);
}

.card-stat i {
    color: var(--accent-primary);
    font-size: 1rem;
}

.buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.buy-btn.ebay {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.buy-btn.ebay:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.buy-btn.tcgplayer {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.buy-btn.tcgplayer:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.buy-btn.pricecharting-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.buy-btn.pricecharting-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.3);
}

.card-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.card-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== LOAD MORE BUTTON ===== */
.load-more-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 15px;
}

.load-more-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    border-color: var(--primary-dark);
}

.load-more-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--text-muted);
    border-color: var(--text-muted);
    box-shadow: none;
}

.load-more-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.load-more-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateX(3px);
}

/* ===== LOADING PLACEHOLDER ===== */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-primary);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CARD ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MESSAGE STYLES ===== */
.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.no-results i,
.error-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-results h3,
.error-message h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.no-results p,
.error-message p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== COMMUNITY SECTION ===== */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.community-card {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.community-card:hover::before {
    transform: scaleX(1);
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    font-size: 2rem;
    color: var(--bg-primary);
}

.community-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter-text h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.newsletter-form .form-group {
    display: flex;
    gap: var(--spacing-md);
}

.newsletter-form .form-input {
    flex: 1;
    padding: var(--spacing-lg);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.newsletter-form .form-input::placeholder {
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-size: 1.25rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.footer-logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: var(--spacing-lg);
}

.footer-bottom-content {
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom-content p {
    margin-bottom: var(--spacing-xs);
}

/* ===== COMMUNITY & NEWSLETTER SECTIONS ===== */
.community {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.community-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-primary);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--bg-primary);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.community-card:hover .community-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
}

.community-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.community-card .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.community-card .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.newsletter {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    border-top: 1px solid var(--border-primary);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-text h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.newsletter-form .form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-input {
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.newsletter-form .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.newsletter-form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
}

/* ===== OFFICIAL PAGE STYLES ===== */
.official-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.news-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card, .news-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-card::before, .news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before, .news-item:hover::before {
    transform: scaleX(1);
}

.news-card:hover, .news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--accent-primary);
}

.news-description, .news-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--accent-secondary);
}

.news-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.news-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.news-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.news-placeholder p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.news-placeholder ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-secondary);
}

.news-placeholder li {
    margin-bottom: var(--spacing-sm);
}

.news-placeholder-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.news-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.news-count, .news-updated {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.news-count i, .news-updated i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .news-status {
        flex-direction: column;
        text-align: center;
    }
}

.resources-section {
    background: var(--bg-primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.resource-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.resource-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.5rem;
}

.resource-category {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.resource-content {
    flex-grow: 1;
    margin-bottom: var(--spacing-lg);
}

.resource-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    font-weight: 600;
}

.resource-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.resource-actions {
    margin-top: auto;
}

.guidelines-section {
    background: var(--bg-secondary);
}

.guidelines-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.guideline-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    text-align: center;
    transition: all var(--transition-normal);
}

.guideline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.guideline-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 2rem;
    margin: 0 auto var(--spacing-lg);
}

.guideline-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
}

.guideline-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.guideline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.guideline-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

/* ===== LOAD MORE BUTTON STYLES ===== */
.load-more-container {
    text-align: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md);
}

.load-more-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    border-color: var(--primary-dark);
}

.load-more-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--text-muted);
    border-color: var(--text-muted);
    box-shadow: none;
}

.load-more-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateX(3px);
}

/* ===== LOADING PLACEHOLDER ===== */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-primary);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CARD ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MESSAGE STYLES ===== */
.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.no-results i,
.error-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-results h3,
.error-message h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.no-results p,
.error-message p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== COMMUNITY SECTION ===== */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.community-card {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.community-card:hover::before {
    transform: scaleX(1);
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    font-size: 2rem;
    color: var(--bg-primary);
}

.community-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter-text h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.newsletter-form .form-group {
    display: flex;
    gap: var(--spacing-md);
}

.newsletter-form .form-input {
    flex: 1;
    padding: var(--spacing-lg);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.newsletter-form .form-input::placeholder {
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-size: 1.25rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.footer-logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: var(--spacing-lg);
}

.footer-bottom-content {
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom-content p {
    margin-bottom: var(--spacing-xs);
}

/* ===== COMMUNITY & NEWSLETTER SECTIONS ===== */
.community {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.community-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-primary);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--bg-primary);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.community-card:hover .community-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
}

.community-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.community-card .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.community-card .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.newsletter {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    border-top: 1px solid var(--border-primary);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-text h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.newsletter-form .form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-input {
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.newsletter-form .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.newsletter-form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
}

/* ===== OFFICIAL PAGE STYLES ===== */
.official-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.news-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card, .news-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-card::before, .news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before, .news-item:hover::before {
    transform: scaleX(1);
}

.news-card:hover, .news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--accent-primary);
}

.news-description, .news-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--accent-secondary);
}

.news-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.news-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.news-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.news-placeholder p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.news-placeholder ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-secondary);
}

.news-placeholder li {
    margin-bottom: var(--spacing-sm);
}

.news-placeholder-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.news-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.news-count, .news-updated {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.news-count i, .news-updated i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .news-status {
        flex-direction: column;
        text-align: center;
    }
}

.resources-section {
    background: var(--bg-primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.resource-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.resource-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.5rem;
}

.resource-category {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.resource-content {
    flex-grow: 1;
    margin-bottom: var(--spacing-lg);
}

.resource-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    font-weight: 600;
}

.resource-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.resource-actions {
    margin-top: auto;
}

.guidelines-section {
    background: var(--bg-secondary);
}

.guidelines-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.guideline-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    text-align: center;
    transition: all var(--transition-normal);
}

.guideline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.guideline-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 2rem;
    margin: 0 auto var(--spacing-lg);
}

.guideline-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
}

.guideline-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.guideline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.guideline-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

/* ===== LOAD MORE BUTTON STYLES ===== */
.load-more-container {
    text-align: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md);
}

.load-more-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    border-color: var(--primary-dark);
}

.load-more-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--text-muted);
    border-color: var(--text-muted);
    box-shadow: none;
}

.load-more-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateX(3px);
}

/* ===== LOADING PLACEHOLDER ===== */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-primary);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CARD ANIMATIONS ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MESSAGE STYLES ===== */
.no-results,
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.no-results i,
.error-message i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.no-results h3,
.error-message h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.no-results p,
.error-message p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== COMMUNITY SECTION ===== */
.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.community-card {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.community-card:hover::before {
    transform: scaleX(1);
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    font-size: 2rem;
    color: var(--bg-primary);
}

.community-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.newsletter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 69, 19, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter-text h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.newsletter-form .form-group {
    display: flex;
    gap: var(--spacing-md);
}

.newsletter-form .form-input {
    flex: 1;
    padding: var(--spacing-lg);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.newsletter-form .form-input::placeholder {
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-size: 1.25rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.footer-logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: var(--spacing-lg);
}

.footer-bottom-content {
    text-align: center;
    color: var(--text-muted);
}

.footer-bottom-content p {
    margin-bottom: var(--spacing-xs);
}

/* ===== COMMUNITY & NEWSLETTER SECTIONS ===== */
.community {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.community-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-primary);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.community-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--bg-primary);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.community-card:hover .community-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
}

.community-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.community-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.community-card .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.community-card .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.newsletter {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    border-top: 1px solid var(--border-primary);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-text h2 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.newsletter-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.newsletter-form .form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.newsletter-form .form-input {
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.newsletter-form .btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.newsletter-form .btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
}

/* ===== OFFICIAL PAGE STYLES ===== */
.official-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.news-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-card, .news-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.news-card::before, .news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before, .news-item:hover::before {
    transform: scaleX(1);
}

.news-card:hover, .news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--accent-primary);
}

.news-description, .news-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

.news-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--accent-secondary);
}

.news-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.news-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
    color: var(--primary-color);
}

.news-placeholder h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.news-placeholder p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.news-placeholder ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-secondary);
}

.news-placeholder li {
    margin-bottom: var(--spacing-sm);
}

.news-placeholder-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.news-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.news-count, .news-updated {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.news-count i, .news-updated i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .news-status {
        flex-direction: column;
        text-align: center;
    }
}

.resources-section {
    background: var(--bg-primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.resource-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.resource-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 1.5rem;
}

.resource-category {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.resource-content {
    flex-grow: 1;
    margin-bottom: var(--spacing-lg);
}

.resource-title {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
    font-weight: 600;
}

.resource-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.resource-actions {
    margin-top: auto;
}

.guidelines-section {
    background: var(--bg-secondary);
}

.guidelines-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.guideline-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-primary);
    text-align: center;
    transition: all var(--transition-normal);
}

.guideline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.guideline-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 2rem;
    margin: 0 auto var(--spacing-lg);
}

.guideline-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
}

.guideline-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.guideline-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.guideline-link:hover {
    background: var(--primary-color);
    color: var(--bg-primary);
}

/* ===== LOAD MORE BUTTON STYLES ===== */
.load-more-container {
    text-align: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-md);
}

.load-more-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    border-color: var(--primary-dark);
}

.load-more-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--text-muted);
    border-color: var(--text-muted);
    box-shadow: none;
}

.load-more-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateX(3px);
}

/* ===== CARD SCANNER STYLES ===== */
.scanner-section {
    background: var(--bg-secondary);
    padding: var(--spacing-3xl) 0;
}

.scanner-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.scanner-video {
    width: 100%;
    max-width: 640px;
    height: 480px;
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    margin: var(--spacing-xl) 0;
    object-fit: cover;
}

.scanner-controls {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
}

.scanner-btn {
    background: var(--gradient-primary);
    color: var(--bg-primary);
    border: none;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.scanner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.scanner-btn.secondary {
    background: var(--secondary-color);
}

.scanner-btn.secondary:hover {
    background: var(--secondary-dark);
}

.scanner-btn.danger {
    background: var(--accent-color);
}

.scanner-btn.danger:hover {
    background: #dc2626;
}

.scanner-status {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
}

.scanner-status.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.scanner-status.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.scanner-results {
    margin-top: var(--spacing-xl);
    text-align: left;
}

.scanner-result-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: all var(--transition-fast);
}

.scanner-result-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.scanner-result-image {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.scanner-result-info {
    flex-grow: 1;
}

.scanner-result-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.scanner-result-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.scanner-result-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.scanner-search-btn {
    background: var(--primary-color);
    color: var(--bg-primary);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.scanner-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ===== AI-ENHANCED SCANNER STYLES ===== */
.scanner-result-card.ai-result {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(255, 215, 0, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.scanner-result-card.ai-result::before {
    content: '🤖 AI Enhanced';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.confidence-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.confidence-high {
    background: #10b981;
    color: white;
}

.confidence-medium {
    background: #f59e0b;
    color: white;
}

.confidence-low {
    background: #ef4444;
    color: white;
}

.card-info {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.card-type, .card-attribute, .card-level {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.ocr-info {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.scanner-search-btn.tcgplayer {
    background: #2c5aa0;
}

.scanner-search-btn.tcgplayer:hover {
    background: #1e3a5f;
}

/* Usage Stats Modal */
.usage-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.usage-stats-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.usage-stats-content h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    text-align: center;
}

.usage-stats-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.usage-stat-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.usage-stat-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

.usage-stat-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.usage-stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.usage-stat-numbers {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
}

.usage-stats-info {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #007bff;
}

.usage-stats-info p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #495057;
}

.usage-stats-info strong {
    color: #007bff;
}

/* Info button styling */
.scanner-btn.info {
    background-color: #17a2b8;
    color: white;
}

.scanner-btn.info:hover {
    background-color: #138496;
}

/* ===== FULL SCREEN CAMERA MODAL STYLES ===== */
.camera-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    z-index: 99999 !important;
    display: none;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    /* Ensure full screen on mobile */
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height */
    min-height: -webkit-fill-available;
    min-height: -moz-available;
    min-height: stretch;
    /* Force full screen positioning */
    right: 0 !important;
    bottom: 0 !important;
}

.camera-modal-content {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Ensure proper mobile fit */
    box-sizing: border-box;
    overflow: hidden;
    /* Force full screen */
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    /* Ensure proper positioning */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    /* Ensure proper sizing */
    min-width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    /* Force visibility */
    z-index: 99999 !important;
}

.camera-container {
    flex: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
    /* Ensure proper mobile fit */
    min-height: 100vh;
    min-height: 100dvh;
    /* Force full screen */
    min-width: 100vw;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    /* Force visibility */
    z-index: 99999 !important;
    /* Force full screen */
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    /* Force full screen */
    min-width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    /* Force full screen */
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    /* Force full screen */
    overflow: hidden !important;
    /* Force full screen */
    box-sizing: border-box !important;
    /* Force full screen */
    margin: 0 !important;
    padding: 0 !important;
    /* Force full screen */
    border: none !important;
    outline: none !important;
    /* Force full screen */
    transform: none !important;
    transition: none !important;
    /* Force full screen */
    will-change: auto !important;
    backface-visibility: visible !important;
    /* Force full screen */
    perspective: none !important;
    transform-style: flat !important;
    /* Force full screen */
    filter: none !important;
    backdrop-filter: none !important;
    /* Force full screen */
    isolation: auto !important;
    mix-blend-mode: normal !important;
    /* Force full screen */
    contain: none !important;
    content-visibility: auto !important;
    /* Force full screen */
    display: block !important;
    visibility: visible !important;
    /* Force full screen */
    opacity: 1 !important;
    pointer-events: auto !important;
    /* Force full screen */
    cursor: pointer !important;
    user-select: none !important;
    /* Force full screen */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    /* Force full screen */
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    /* Force full screen */
    -webkit-overflow-scrolling: touch !important;
    -webkit-transform: translateZ(0) !important;
    /* Force full screen */
    -webkit-backface-visibility: visible !important;
    -webkit-perspective: none !important;
    /* Force full screen */
    -webkit-transform-style: flat !important;
    -webkit-filter: none !important;
    /* Force full screen */
    -webkit-backdrop-filter: none !important;
    -webkit-mask: none !important;
    /* Force full screen */
    -webkit-clip-path: none !important;
    -webkit-shape-outside: none !important;
    /* Force full screen */
    -webkit-text-size-adjust: none !important;
    -webkit-font-smoothing: auto !important;
    /* Force full screen */
    -webkit-appearance: none !important;
    -webkit-border-radius: 0 !important;
    /* Force full screen */
    -webkit-box-shadow: none !important;
    -webkit-text-shadow: none !important;
    /* Force full screen */
    -webkit-appearance: none !important;
    -webkit-border-radius: 0 !important;
    /* Force full screen */
    -webkit-box-shadow: none !important;
    -webkit-text-shadow: none !important;
    /* Force full screen */
    -webkit-transition: none !important;
    -webkit-animation: none !important;
    /* Force full screen */
    -webkit-transform: none !important;
    -webkit-transform-origin: 50% 50% !important;
    /* Force full screen */
    -webkit-transition: none !important;
    -webkit-animation: none !important;
    /* Force full screen */
    -webkit-transform: none !important;
    -webkit-transform-origin: 50% 50% !important;
    /* Force full screen */
    -webkit-transform-style: flat !important;
    -webkit-backface-visibility: visible !important;
    /* Force full screen */
    -webkit-perspective: none !important;
    -webkit-perspective-origin: 50% 50% !important;
    /* Force full screen */
    -webkit-transform-style: flat !important;
    -webkit-backface-visibility: visible !important;
    /* Force full screen */
    -webkit-perspective: none !important;
    -webkit-perspective-origin: 50% 50% !important;
    /* Force full screen */
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Force full screen */
    -webkit-mask: none !important;
    -webkit-mask-image: none !important;
    /* Force full screen */
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Force full screen */
    -webkit-mask: none !important;
    -webkit-mask-image: none !important;
    /* Force full screen */
    -webkit-mask-size: auto !important;
    -webkit-mask-repeat: repeat !important;
    /* Force full screen */
    -webkit-mask-position: 0% 0% !important;
    -webkit-mask-clip: border-box !important;
    /* Force full screen */
    -webkit-mask-size: auto !important;
    -webkit-mask-repeat: repeat !important;
    /* Force full screen */
    -webkit-mask-position: 0% 0% !important;
    -webkit-mask-clip: border-box !important;
    /* Force full screen */
    -webkit-mask-origin: border-box !important;
    -webkit-mask-composite: source-over !important;
    /* Force full screen */
    -webkit-clip-path: none !important;
    -webkit-shape-outside: none !important;
    /* Force full screen */
    -webkit-mask-origin: border-box !important;
    -webkit-mask-composite: source-over !important;
    /* Force full screen */
    -webkit-clip-path: none !important;
    -webkit-shape-outside: none !important;
    /* Force full screen */
    -webkit-text-size-adjust: none !important;
    -webkit-font-smoothing: auto !important;
}

.scanner-video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    /* Ensure proper mobile fit */
    min-height: 100vh;
    min-height: 100dvh;
    /* Force full screen */
    min-width: 100vw;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    /* Force visibility */
    z-index: 99999 !important;
}

/* Add hover effect for tap-to-capture */
.camera-container:hover {
    cursor: pointer !important;
    background: rgba(255, 215, 0, 0.05) !important;
}

/* Add tap feedback effect */
.camera-container:active {
    background: rgba(255, 215, 0, 0.1) !important;
    transform: scale(0.98) !important;
    transition: all 0.1s ease !important;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    pointer-events: none;
    padding: 1rem;
    box-sizing: border-box;
    /* Ensure content fits on mobile */
    min-height: 100%;
    overflow: hidden;
    /* Force full screen */
    min-width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    /* Force visibility */
    position: fixed !important;
    z-index: 99999 !important;
}

.overlay-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.8);
    padding: 1rem 2rem;
    border-radius: 25px;
    max-width: 90%;
    line-height: 1.4;
    animation: pulse-text 2s ease-in-out infinite;
}

.overlay-frame {
    width: 280px;
    height: 400px;
    border: 3px solid #fff;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
    margin-bottom: 2rem;
    position: relative;
}

.overlay-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 20px;
    animation: pulse 2s infinite;
}

.close-camera-btn {
    position: absolute;
    top: max(20px, env(safe-area-inset-top) + 10px);
    right: max(20px, env(safe-area-inset-right) + 10px);
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    /* Force visibility */
    position: fixed !important;
    z-index: 99999 !important;
}

.close-camera-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.camera-controls {
    position: fixed;
    bottom: max(40px, env(safe-area-inset-bottom) + 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-instruction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    animation: bounce 2s ease-in-out infinite;
}

.camera-instruction i {
    font-size: 1.2rem;
    color: #ffd700;
}

.capture-btn {
    background: var(--gradient-primary);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 1.2rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    min-width: 160px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.capture-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.capture-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.camera-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
    z-index: 5;
    /* Force visibility */
    position: fixed !important;
    z-index: 99999 !important;
}

.camera-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsiveness for Camera Modal */
@media (max-width: 768px) {
    .camera-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height for mobile */
        background: #000 !important;
        z-index: 99999 !important;
        /* Force full screen */
        right: 0 !important;
        bottom: 0 !important;
    }
    
    .overlay-text {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .overlay-frame {
        width: 240px;
        height: 340px;
        margin-bottom: 1.5rem;
    }
    
    .overlay-frame::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
    

    
    .close-camera-btn {
        top: max(15px, env(safe-area-inset-top) + 8px);
        right: max(15px, env(safe-area-inset-right) + 8px);
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .camera-controls {
        bottom: max(30px, env(safe-area-inset-bottom) + 15px);
        padding: 0.75rem;
        background: rgba(0, 0, 0, 0.4);
        /* Ensure visibility on mobile */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.2);
        /* Ensure proper positioning */
        position: absolute !important;
        z-index: 10 !important;
    }
    
    .capture-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-width: 140px;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .camera-modal {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* Dynamic viewport height for mobile */
        /* Force full screen */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    .overlay-text {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .overlay-frame {
        width: 200px;
        height: 280px;
        margin-bottom: 1rem;
    }
    
    .camera-controls {
        bottom: max(20px, env(safe-area-inset-bottom) + 10px);
        padding: 0.5rem;
        gap: 0.5rem;
        /* Ensure visibility on small screens */
        background: rgba(0, 0, 0, 0.5);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    }
    
    .capture-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-width: 120px;
    }
    
    .close-camera-btn {
        top: max(10px, env(safe-area-inset-top) + 5px);
        right: max(10px, env(safe-area-inset-right) + 5px);
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .overlay-text {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .overlay-frame {
        width: 180px;
        height: 240px;
        margin-bottom: 1rem;
    }
    
    .camera-controls {
        bottom: max(15px, env(safe-area-inset-bottom) + 10px);
        /* Ensure visibility in landscape */
        background: rgba(0, 0, 0, 0.6);
        padding: 0.5rem;
    }
    
    .camera-modal {
        height: 100vh !important;
        height: 100dvh !important;
    }
}

/* ===== FEATURES & TIPS GRID STYLES ===== */
.features-grid,
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
}

.feature-card,
.tip-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-card:hover,
.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-heavy);
    border-color: var(--primary-color);
}

.feature-icon,
.tip-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 2rem;
    margin: 0 auto var(--spacing-lg);
}

.feature-card h3,
.tip-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-card p,
.tip-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Community & Newsletter Responsive */
@media (max-width: 768px) {
    .community-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .community-card {
        padding: 1.5rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .newsletter-form .form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-form .form-input {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .community-card {
        padding: 1rem;
    }
    
    .community-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .newsletter-text h2 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-2xl);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-2xl);
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-xl);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-normal);
        border-bottom: 1px solid var(--border-primary);
        z-index: 1000;
        box-shadow: 0 4px 20px var(--shadow-heavy);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--spacing-lg);
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: var(--spacing-md);
        text-align: center;
        border-radius: var(--radius-md);
        background: rgba(255, 215, 0, 0.05);
        border: 1px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 215, 0, 0.1);
        border-color: var(--primary-color);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .community-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ===== ANIMATIONS & EFFECTS ===== */

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

@keyframes pulse-text {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== ENHANCED DESIGN IMPROVEMENTS ===== */
.card-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    perspective: 1000px;
    border: 2px solid transparent;
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
}

.card-item:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 25px 50px rgba(255, 215, 0, 0.25);
    border-color: var(--primary-color);
    z-index: 15;
}

.card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.08), transparent);
    transition: left 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.card-item:hover::before {
    left: 100%;
}

.card-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card-item:hover::after {
    opacity: 1;
}

/* ===== ENHANCED BUTTON EFFECTS ===== */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.8s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e6b800 100%);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6b800 0%, var(--primary-color) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #8b4513 100%);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #8b4513 0%, var(--secondary-color) 100%);
}

/* ===== ENHANCED NAVIGATION EFFECTS ===== */
.nav-link {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.08), transparent);
    transition: left 0.8s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    transform: translateY(-2px);
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ===== ENHANCED HERO EFFECTS ===== */
.hero-title {
    position: relative;
    overflow: hidden;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.hero-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.15), transparent);
    animation: shimmer 5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== ENHANCED LOADING EFFECTS ===== */
.loading-spinner {
    position: relative;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.loading-spinner::before {
    border-top-color: var(--primary-color);
    animation: spin 1.2s linear infinite;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.loading-spinner::after {
    border-right-color: var(--accent-color);
    animation: spin 1.8s linear infinite reverse;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.5);
}

/* ===== CARD GRID IMPROVEMENTS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
    justify-items: center;
    padding: var(--spacing-lg);
}

.card-item {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ===== CARD INFORMATION STYLING ===== */
.card-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.card-set-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: var(--spacing-md);
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-primary);
}

.set-code {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.set-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== BUY BUTTONS ===== */
.buy-buttons {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.buy-btn {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.buy-btn.ebay {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.buy-btn.ebay:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.buy-btn.tcgplayer {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.buy-btn.tcgplayer:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.buy-btn.pricecharting-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
}

.buy-btn.pricecharting-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.4);
}

/* ===== TOURNAMENT CARD ENHANCEMENTS ===== */
.tournament-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 2px solid transparent;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tournament-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 215, 0, 0.2);
    border-color: var(--primary-color);
}

.tournament-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 2px solid var(--border-primary);
}

.tournament-type {
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tournament-status.registration-open {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.tournament-status.registration-closed {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* ===== RESOURCE CARD ENHANCEMENTS ===== */
.resource-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.resource-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 25px 50px rgba(255, 215, 0, 0.15);
    border-color: var(--primary-color);
}

.resource-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e6b800 100%);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* ===== SEARCH FILTERS ===== */
.search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
    padding: 35px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: var(--radius-2xl);
    border: 2px solid var(--border-primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.search-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.search-group label {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.search-group input,
.search-group select {
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-xl);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    border-color: var(--primary-dark);
}

.clear-filters-btn {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--text-primary);
    border: 2px solid var(--secondary-color);
    padding: 16px 32px;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
}

.clear-filters-btn:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.4);
    border-color: var(--secondary-dark);
}

/* ===== TOURNAMENT STYLES ===== */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

.tournament-header {
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tournament-type {
    font-size: 0.9rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.tournament-status {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tournament-content {
    padding: var(--spacing-lg);
}

.tournament-name {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    font-weight: 600;
}

.tournament-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
}

.tournament-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.tournament-detail {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tournament-detail i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.tournament-deadline {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.tournament-organizer {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.tournament-actions {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-primary);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ===== RESOURCES SECTION ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.resource-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.resource-card:hover::before {
    transform: scaleX(1);
}

.resource-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    font-size: 2rem;
    color: var(--bg-primary);
}

.resource-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.resource-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ===== EVENTS HERO ===== */
.events-hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.events-hero .hero-title {
    font-size: 3.5rem;
}

.events-hero .hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
}

/* ===== RESPONSIVE TOURNAMENTS ===== */
@media (max-width: 768px) {
    .tournaments-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .tournament-details {
        grid-template-columns: 1fr;
    }
    
    .tournament-actions {
        flex-direction: column;
    }
    
    .events-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== CARD DISPLAY ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card-item {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.card-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-fast);
    background: var(--bg-card);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.card-item:hover .card-overlay {
    opacity: 1;
}

.view-details-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-details-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.card-info {
    padding: 20px;
}

.card-name {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.3;
    font-weight: 600;
}

.card-type,
.card-attribute,
.card-level,
.card-atk,
.card-def {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.card-attribute {
    color: var(--accent-color);
    font-weight: 600;
}

.card-level {
    color: var(--primary-color);
    font-weight: 600;
}

.card-atk {
    color: var(--success-color);
    font-weight: 600;
}

.card-def {
    color: var(--warning-color);
    font-weight: 600;
}

.card-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}



.buy-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.ebay-btn {
    background: #86b817;
    color: white;
}

.ebay-btn:hover {
    background: #6b8f12;
    transform: translateY(-2px);
}

.tcgplayer-btn {
    background: #2c5aa0;
    color: white;
}

.tcgplayer-btn:hover {
    background: #1e3d6b;
    transform: translateY(-2px);
}

.pricecharting-btn {
    background: #9b59b6;
    color: white;
}

.pricecharting-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

/* ===== MODAL STYLES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.card-details-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-header h2 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.8rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
}

.card-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-card-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.info-group {
    margin-bottom: 20px;
}

.info-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.info-group span,
.info-group p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-group.description p {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.market-info {
    margin-top: 25px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
}

.market-info h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Modal responsive styles */
@media (max-width: 768px) {
    .card-details-modal {
        max-width: 95%;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px 25px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 25px;
    }
    
    .card-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .card-details-modal {
        max-width: 98%;
        width: 98%;
        max-height: 98vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
}



/* ===== LOAD MORE BUTTON ===== */
.load-more-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: var(--bg-primary);
    border: 2px solid var(--primary-color);
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    margin: 30px auto 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4);
    border-color: var(--primary-dark);
}

.load-more-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.load-more-btn:disabled {
    background: var(--text-muted);
    border-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== UTILITY CLASSES ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--error-color);
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--error-color);
}

/* ===== LOADING SPINNER ===== */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-primary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== NOTIFICATION SYSTEM ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
    font-family: var(--font-secondary);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 0.8;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

.notification.warning {
    background: var(--warning-color);
}

.notification.info {
    background: var(--info-color);
}

/* ===== LOAD MORE CONTAINER ===== */
        .load-more-container {
            grid-column: 1 / -1;
            text-align: center;
            margin-top: 40px;
            order: 9999;
            position: relative;
            z-index: 10;
        }

/* ===== FADE IN ANIMATION ===== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .search-filters {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .card-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

/* Ensure card attributes are visible */
.card-attribute:not(:empty) {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Debug styling for card attributes */
.card-attribute::before {
    content: 'ATTR: ';
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Card Meta Information */
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
    align-items: center;
    justify-content: center;
}

.card-type,
.card-attribute,
.card-level {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.card-type {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: 1px solid #3b82f6;
}

.card-attribute {
    background: linear-gradient(135deg, #cd853f 0%, #b8860b 100%);
    color: white;
    border: 1px solid #cd853f;
}

.card-level {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid #10b981;
}

/* Hover effects for card meta */
.card-type:hover,
.card-attribute:hover,
.card-level:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Ensure card attributes are visible */
.card-attribute:not(:empty) {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Remove debug styling for card attributes */
.card-attribute::before {
    content: '';
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    min-height: 3rem;
    display: flex;
    align-items: center;
}

/* Responsive grid adjustments */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
    
    .card-item {
        padding: 1.25rem;
    }
    
    .card-image {
        height: 240px;
    }
    
    .card-name {
        font-size: 1.25rem;
    }
    
    .card-meta {
        gap: 8px;
        margin: 12px 0;
    }
    
    .card-type,
    .card-attribute,
    .card-level {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .buy-buttons {
        gap: 0.5rem;
    }
    
    .buy-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-item {
        padding: 1rem;
    }
    
    .card-image {
        height: 200px;
    }
    
    .card-name {
        font-size: 1.2rem;
    }
    
    .card-meta {
        flex-direction: column;
        gap: 6px;
        margin: 10px 0;
    }
    
    .card-type,
    .card-attribute,
    .card-level {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .card-stats {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .buy-buttons {
        gap: 0.5rem;
    }
    
    .buy-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

/* Camera overlay and container styles */
.camera-container {
    position: relative;
    display: inline-block;
    margin: var(--spacing-xl) 0;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    pointer-events: none;
    z-index: 10;
}

.overlay-text {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
}

.overlay-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 300px;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.overlay-frame::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
}

/* Upload button styles */
.scanner-btn.tertiary {
    background: var(--gradient-tertiary);
}

.scanner-btn.tertiary:hover {
    background: var(--tertiary-dark);
}

/* Rescan button styles */
.scanner-rescan-btn {
    background: var(--gradient-secondary);
    color: var(--bg-primary);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.scanner-rescan-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

/* Warning status style */
.scanner-status.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

/* Info status style */
.scanner-status.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Info status style */
.scanner-status.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Manual search styles */
.manual-search {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.manual-search h3 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.manual-search p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.manual-search-form {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.manual-search-input {
    flex: 1;
    min-width: 250px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.manual-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.manual-search-input::placeholder {
    color: var(--text-tertiary);
}

/* Scanner note styles */
.scanner-note {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    text-align: center;
}

.scanner-note p {
    color: #f59e0b;
    margin: 0;
    font-size: 0.9rem;
}

/* ===== ENHANCED CARD DESIGN & RARITY BADGES ===== */

/* Card rarity badge (main card display) */
.card-rarity-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #ffffff;
    padding: 5px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
    z-index: 10;
    border: 2px solid #ffd700;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Rarity-specific color variations with better contrast */
.card-rarity-badge[data-rarity*="Secret"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #ffd700;
    border-color: #ffd700;
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.3);
}

.card-rarity-badge[data-rarity*="Ultra"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #ffd700;
    border-color: #ffd700;
    box-shadow: 0 3px 12px rgba(255, 215, 0, 0.3);
}

.card-rarity-badge[data-rarity*="Rare"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #c0c0c0;
    border-color: #c0c0c0;
    box-shadow: 0 3px 12px rgba(192, 192, 192, 0.3);
}

.card-rarity-badge[data-rarity*="Common"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #daa520;
    border-color: #daa520;
    box-shadow: 0 3px 12px rgba(218, 165, 32, 0.3);
}

.card-rarity-badge[data-rarity*="Starlight"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #ff69b4;
    border-color: #ff69b4;
    box-shadow: 0 3px 12px rgba(255, 105, 180, 0.3);
}

.card-rarity-badge[data-rarity*="Ghost"] {
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0f 100%);
    color: #e6e6fa;
    border-color: #e6e6fa;
    box-shadow: 0 3px 12px rgba(230, 230, 250, 0.3);
}

/* Enhanced hover effects */
.card-rarity-badge:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
    filter: brightness(1.2);
}

/* Card item improvements */
.card-item {
    background: linear-gradient(135deg, #2a1a1a 0%, #3d2b2b 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #8b4513;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: cardEntrance 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.card-item:nth-child(1) { animation-delay: 0.1s; }
.card-item:nth-child(2) { animation-delay: 0.2s; }
.card-item:nth-child(3) { animation-delay: 0.3s; }
.card-item:nth-child(4) { animation-delay: 0.4s; }
.card-item:nth-child(5) { animation-delay: 0.5s; }
.card-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: #ffd700;
    z-index: 5;
}

.card-item:active {
    transform: translateY(-4px) scale(1.01);
    transition: all 0.1s ease;
}

/* Card image container improvements */
.card-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a0f0f 0%, #2a1a1a 100%);
    transition: all 0.3s ease;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.card-item:hover .card-image {
    transform: scale(1.05);
}

/* Card overlay improvements */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 15, 15, 0.8) 0%, rgba(139, 69, 19, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.card-item:hover .card-overlay {
    opacity: 1;
}

/* View details button improvements */
.view-details-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #1a0f0f;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    border: 2px solid transparent;
}

.view-details-btn:hover {
    background: linear-gradient(135deg, #ffb300 0%, #ffd700 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.6);
    border-color: #ffffff;
}

/* Card info improvements */
.card-info {
    padding: 10px;
    background: linear-gradient(135deg, #2a1a1a 0%, #3d2b2b 100%);
}

.card-name {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 6px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Card meta improvements */
.card-type,
.card-attribute,
.card-level {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: inline-block;
    margin-right: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card-type {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #1a0f0f;
}

.card-attribute {
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: #ffffff;
}

.card-level {
    background: linear-gradient(135deg, #cd853f 0%, #daa520 100%);
    color: #1a0f0f;
}

/* Card set info improvements */
.card-set-info {
    background: linear-gradient(135deg, #3d2b2b 0%, #4a3a3a 100%);
    padding: 6px;
    border-radius: 6px;
    margin: 6px 0;
    border-left: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.set-code {
    display: block;
    font-weight: 700;
    color: #ffd700;
    font-size: 0.9rem;
    margin-bottom: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.set-name {
    display: block;
    color: #f5deb3;
    font-size: 0.8rem;
    font-style: italic;
}

/* Buy buttons improvements */
.buy-buttons {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.buy-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ebay-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.ebay-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

.tcgplayer-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.tcgplayer-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.5);
}

.pricecharting-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}

.pricecharting-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.5);
}

/* Enhanced loading and shimmer effects */
.card-item.loading {
    position: relative;
    overflow: hidden;
}

.card-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 10;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Card focus states for accessibility */
.card-item:focus-within {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* Enhanced card interactions */
.card-item:hover .card-rarity-badge {
    transform: scale(1.1) translateY(-2px);
}

.card-item:hover .card-set-info {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile responsiveness for rarity badges */
@media (max-width: 768px) {
    .card-image-container {
        height: 200px;
    }
    
    .card-rarity-badge {
        top: 8px;
        right: 8px;
        padding: 4px 7px;
        font-size: 0.65rem;
    }
    
    .card-info {
        padding: 12px;
    }
    
    .card-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .card-image-container {
        height: 180px;
    }
    
    .card-rarity-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    .card-info {
        padding: 10px;
    }
    
    .card-name {
        font-size: 1rem;
    }
    
    .buy-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .buy-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* Mobile-First Scanner Styles */
.mobile-scanner {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
}

.scanner-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.scanner-header h1 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
    font-family: 'Cinzel', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.scanner-header p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.camera-view {
    flex: 1;
    position: relative;
    background: #000;
    margin: 1rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-height: 400px;
}

#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scan-frame {
    position: relative;
    width: 280px;
    height: 180px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #00d4ff;
    border-radius: 50%;
}

.corner.top-left {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: -10px;
    right: -10px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: -10px;
    left: -10px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

.scan-text {
    color: white;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.camera-controls {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    background: #00d4ff;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.capture-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.6);
}

.scanner-actions {
    padding: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.manual-panel,
.results-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 2rem 1.5rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
}

.manual-panel.show,
.results-panel.show {
    transform: translateY(0);
}

.manual-header,
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.manual-header h3,
.results-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#manual-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

#manual-input:focus {
    border-color: #00d4ff;
}

.search-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px;
    background: #00d4ff;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #0099cc;
    transform: translateY(-1px);
}

.detected-text {
    margin-bottom: 2rem;
}

.detected-text h4 {
    margin: 0 0 0.5rem;
    color: #333;
    font-size: 1.2rem;
}

.detected-text p {
    margin: 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #00d4ff;
    font-family: monospace;
    font-size: 1rem;
    line-height: 1.5;
    color: #333;
}

.search-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-action-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.search-action-btn.ebay {
    background: #86bc25;
    color: white;
}

.search-action-btn.ebay:hover {
    background: #6b9a1e;
    transform: translateY(-2px);
}

.search-action-btn.tcgplayer {
    background: #2c5aa0;
    color: white;
}

.search-action-btn.tcgplayer:hover {
    background: #1e3d6b;
    transform: translateY(-2px);
}

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    margin: 0;
    font-size: 1.1rem;
}

.error-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff4757;
    color: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    z-index: 2000;
    max-width: 300px;
}

.error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.error-message p {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

.retry-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide elements initially */
#capture-btn,
#switch-camera,
#upload-btn {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .scanner-header h1 {
        font-size: 1.8rem;
    }
    
    .scanner-header p {
        font-size: 0.9rem;
    }
    
    .camera-view {
        margin: 0.5rem;
        min-height: 350px;
    }
    
    .scan-frame {
        width: 250px;
        height: 160px;
    }
    
    .camera-controls {
        bottom: 1.5rem;
        gap: 1.5rem;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .capture-btn {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .action-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        min-width: 120px;
    }
    
    .manual-panel,
    .results-panel {
        padding: 1.5rem 1rem;
    }
}

/* Show panels when they should be visible */
.manual-panel[style*="display: block"],
.results-panel[style*="display: block"] {
    transform: translateY(0);
}

/* Ensure proper stacking */
.mobile-scanner {
    position: relative;
    z-index: 1;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
button:focus,
input:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success animations */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: successPulse 0.5s ease;
}
