:root {
    --afc-green: #658451;
    --afc-dark: #121410;
    --afc-darker: #0a0b09;
    --afc-panel: rgba(20, 24, 18, 0.85);
    --afc-border: rgba(101, 132, 81, 0.3);
    --afc-accent: #eab308;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--afc-darker);
    color: #e5e7eb;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Lightbox Styles */
#lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

#lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border: 2px solid var(--afc-green);
    box-shadow: 0 0 30px rgba(101, 132, 81, 0.3);
    object-fit: contain;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

#lightbox-close:hover {
    color: var(--afc-green);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: 1px solid var(--afc-green);
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.lightbox-nav:hover {
    background: var(--afc-green);
    color: white;
}

.lightbox-nav.left {
    left: 20px;
}

.lightbox-nav.right {
    right: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Teko', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f110e;
}
::-webkit-scrollbar-thumb {
    background: #3f4d36;
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: #5d7a47;
}

/* Tactical Elements */
.tactical-border {
    border: 1px solid var(--afc-border);
    position: relative;
}

.tactical-border::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--afc-green);
    border-left: 2px solid var(--afc-green);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.tactical-border::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--afc-green);
    border-right: 2px solid var(--afc-green);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.font-teko {
    font-family: 'Teko', sans-serif;
}

.tactical-border:hover::before,
.tactical-border:hover::after {
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-overlay {
    background: linear-gradient(to bottom, rgba(10,11,9,0.7) 0%, rgba(10,11,9,0.4) 50%, rgba(10,11,9,1) 100%);
}

/* Page Header */
.page-header {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header-overlay {
    background: linear-gradient(to bottom, rgba(10,11,9,0.8) 0%, rgba(10,11,9,0.6) 50%, rgba(10,11,9,1) 100%);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 250px);
    }
    
    .gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.gallery-item img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* HUD elements */
.hud-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--afc-green), transparent);
    width: 100%;
    margin: 2rem 0;
    opacity: 0.3;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--afc-green), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--afc-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--afc-green);
}

/* Stats Counter */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--afc-dark);
    border: 1px solid var(--afc-border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--afc-green);
    box-shadow: 0 10px 30px rgba(101, 132, 81, 0.2);
}

.stat-number {
    font-family: 'Teko', sans-serif;
    font-size: 4rem;
    color: var(--afc-green);
    line-height: 1;
}

/* Rank Cards */
.rank-card {
    background: linear-gradient(135deg, var(--afc-dark) 0%, rgba(101, 132, 81, 0.1) 100%);
    border: 1px solid var(--afc-border);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.rank-card:hover {
    border-color: var(--afc-green);
    transform: scale(1.02);
}

/* Requirements List */
.requirements-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.requirements-list li i {
    color: var(--afc-green);
}

/* Active nav link */
.nav-active {
    color: var(--afc-green) !important;
    border-bottom: 2px solid var(--afc-green);
}

/* Enhanced Buttons */
a[href*="discord"], 
a[href*="join.html"]:not(nav a),
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

a[href*="discord"]::before,
.btn-primary::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 ease;
}

a[href*="discord"]:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

a[href*="discord"]:hover,
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

/* Green CTA buttons */
a.bg-\[\#658451\]:hover,
a.bg-\[\#3f4d36\]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(101, 132, 81, 0.4);
}

/* Nav button enhancement */
nav a.bg-\[\#3f4d36\] {
    position: relative;
    overflow: hidden;
}

nav a.bg-\[\#3f4d36\]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--afc-green), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav a.bg-\[\#3f4d36\]:hover::after {
    transform: scaleX(1);
}

/* All tactical buttons glow on hover */
.tactical-border:hover {
    box-shadow: 0 0 20px rgba(101, 132, 81, 0.2);
}

/* YouTube button */
a[href*="youtube"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

/* Arrow buttons in carousels */
button:hover i.fa-chevron-left,
button:hover i.fa-chevron-right {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* Footer social icons */
footer a:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Responsive improvements */
@media (max-width: 640px) {
    h1 {
        font-size: 2.75rem !important;
        line-height: 1.1;
    }

    h2 {
        font-size: 2rem !important;
    }

    .page-header {
        min-height: 32vh;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }

    .gallery-item:nth-child(1) {
        grid-column: auto;
        grid-row: auto;
    }

    nav .font-teko {
        font-size: 1.125rem;
    }
}

@media (max-width: 900px) {
    iframe {
        max-height: 70vh;
    }
}

/* Orders page responsive layout */
.order-layout {
    align-items: start;
}

.order-panel,
.order-sidebar {
    position: relative;
    isolation: isolate;
}

.panel-glow {
    position: relative;
    overflow: hidden;
}

.panel-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(101, 132, 81, 0.15), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.panel-glow:hover::after {
    opacity: 1;
}

.ticket-card {
    border: 1px solid rgba(101, 132, 81, 0.25);
    background: rgba(10, 11, 9, 0.7);
    padding: 1rem;
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ticket-card:hover {
    transform: translateY(-4px);
    border-color: rgba(101, 132, 81, 0.5);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

.ticket-card .ticket-title {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    color: #e2f2d3;
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.chat-bubble {
    background: rgba(10, 11, 9, 0.85);
    border: 1px solid rgba(101, 132, 81, 0.3);
    padding: 0.85rem;
    border-radius: 0.75rem;
    animation: fadeInUp 0.35s ease;
}

#chat-modal .chat-bubble {
    background: rgba(15, 18, 14, 0.9);
}

#chat-modal {
    animation: fadeIn 0.2s ease;
}

#chat-modal .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

#chat-modal .custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(101, 132, 81, 0.4);
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 0.4; }
}

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

.stat-chip {
    background: rgba(18, 20, 16, 0.85);
    border: 1px solid rgba(101, 132, 81, 0.3);
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-chip:hover {
    transform: translateY(-3px);
    border-color: rgba(101, 132, 81, 0.6);
}

.stat-chip .stat-value {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    color: var(--afc-green);
}

@media (max-width: 1024px) {
    .order-layout {
        grid-template-columns: 1fr !important;
    }

    .order-panel,
    .order-sidebar {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .order-panel,
    .order-sidebar {
        padding: 1.25rem !important;
    }

    #ticket-form input,
    #ticket-form textarea,
    #ticket-form select {
        font-size: 0.95rem;
    }

    #user-tickets,
    #admin-tickets {
        max-height: 50vh;
        overflow-y: auto;
    }
}

@media (max-width: 1024px) {
    .order-layout {
        grid-template-columns: 1fr !important;
    }

    .order-panel,
    .order-sidebar {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .order-panel,
    .order-sidebar {
        padding: 1.25rem !important;
    }

    #ticket-form input,
    #ticket-form textarea,
    #ticket-form select {
        font-size: 0.95rem;
    }

    #user-tickets,
    #admin-tickets {
        max-height: 50vh;
        overflow-y: auto;
    }
}
