/*
 * Infinity FlyFF - Improved Dark Fantasy Theme
 * Enhanced UX, Design, and Interactivity
 */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --color-primary: #B22222; /* Firebrick Red */
    --color-secondary: #4F4F4F; /* Dark Gray */
    --color-accent: #FFD700; /* Gold */
    --color-purple: #8B00FF; /* Dark Purple */
    --color-blue: #1E90FF; /* Dodger Blue */
    
    /* Text Colors */
    --color-text-dark: #FFFFFF;
    --color-text-light: #1A1A1A;
    --color-text-muted: #CCCCCC;
    
    /* Background Colors */
    --color-background-soft: rgba(0, 0, 0, 0.85);
    --color-background-card: rgba(20, 20, 20, 0.9);
    --color-dark-bg: #0A0A0A;
    
    /* Effects */
    --shadow-default: 0 4px 15px rgba(0, 0, 0, 0.9);
    --shadow-hover: 0 8px 25px rgba(178, 34, 34, 0.6);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.5);
    --glow-red: 0 0 20px rgba(178, 34, 34, 0.7);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Mitr', sans-serif;
    background: var(--color-dark-bg);
    color: var(--color-text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-dark-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loading-logo {
    width: 300px;
    height: auto;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.loading-bar {
    width: 300px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto 20px;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: var(--glow-gold);
}

.loading-text {
    color: var(--color-text-muted);
    font-size: 1.1em;
}

/* ===== Background ===== */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(30%) brightness(60%);
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* ===== Particle Effects ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
    box-shadow: 0 0 10px var(--color-accent);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ===== Header ===== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: var(--shadow-default);
    padding: 15px 0;
    transition: all var(--transition-normal);
}

.main-header.scrolled {
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.98);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-text-dark);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.top-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.menu-group {
    display: flex;
    gap: 5px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.menu-icon {
    font-size: 1.2em;
    filter: grayscale(100%);
    transition: filter var(--transition-fast);
}

.menu-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transform: translateX(-50%);
    transition: width var(--transition-fast);
}

.menu-item:hover {
    color: var(--color-accent);
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
}

.menu-item:hover .menu-icon {
    filter: grayscale(0%);
}

.menu-item:hover::before {
    width: 80%;
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.3), rgba(255, 215, 0, 0.2));
    color: var(--color-accent);
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.3);
}

/* ===== Main Content ===== */
.main-content {
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== Logo Section ===== */
.logo-section {
    text-align: center;
    padding: 60px 20px;
}

.logo-area {
    position: relative;
    display: inline-block;
    padding: 40px;
    background: radial-gradient(circle, rgba(178, 34, 34, 0.15), transparent 70%);
    border-radius: 20px;
}

.logo-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2), transparent 60%);
    border-radius: 50%;
    animation: pulse-glow 3s infinite;
    z-index: -1;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.main-logo {
    width: 500px;
    max-width: 90vw;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(178, 34, 34, 0.8)) 
            drop-shadow(0 0 40px rgba(255, 215, 0, 0.4));
    animation: logo-float 6s infinite ease-in-out;
    transition: transform var(--transition-normal);
}

.main-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(178, 34, 34, 1)) 
            drop-shadow(0 0 50px rgba(255, 215, 0, 0.6));
}

@keyframes logo-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Server Status */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(178, 34, 34, 0.3), rgba(0, 0, 0, 0.8));
    border: 2px solid var(--color-accent);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-default), inset 0 0 20px rgba(255, 215, 0, 0.1);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00FF00;
    box-shadow: 0 0 15px #00FF00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.status-players {
    color: var(--color-accent);
}

/* ===== Action Buttons - New Design ===== */
.action-section {
    padding: 40px 20px;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding: 20px;
}

.action-btn {
    position: relative;
    width: 200px;
    height: 200px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 20px;
    width: 160px;
    height: 160px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.btn-icon-wrapper {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1E90FF, #4169E1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(30, 144, 255, 0.6),
                inset 0 2px 8px rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}



.btn-icon {
    font-size: 2.2em;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.text-th {
    font-size: 1.0em;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #FFFFFF;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9),
                 0 0 15px rgba(255, 255, 255, 0.4);
    font-family: 'Mitr', sans-serif;
    margin-top: 5px;
}

.text-en {
    font-size: 0.75em;
    font-weight: 600;
    color: #B0B0B0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
    letter-spacing: 1.5px;
}

.action-btn:hover {
    transform: translateY(-10px);
}

.action-btn:hover .btn-content {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.action-btn:hover .btn-icon-wrapper {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 8px 30px rgba(30, 144, 255, 1),
                inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.action-btn:hover .btn-icon {
    transform: scale(1.1);
}

.action-btn:active {
    transform: translateY(-5px);
}

.action-btn:active .btn-content {
    transform: scale(0.98);
}

.download-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #1E90FF, #4169E1);
}

.download-btn:hover .btn-icon-wrapper {
    box-shadow: 0 8px 30px rgba(30, 144, 255, 1),
                inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.register-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.register-btn:hover .btn-icon-wrapper {
    box-shadow: 0 8px 30px rgba(255, 215, 0, 1),
                inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.fanpage-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #1E90FF, #4169E1);
}

.fanpage-btn:hover .btn-icon-wrapper {
    box-shadow: 0 8px 30px rgba(30, 144, 255, 1),
                inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.discord-btn .btn-icon-wrapper {
    background: linear-gradient(135deg, #E0E0E0, #B0B0B0);
}

.discord-btn:hover .btn-icon-wrapper {
    box-shadow: 0 8px 30px rgba(224, 224, 224, 1),
                inset 0 2px 10px rgba(255, 255, 255, 0.5);
}



/* ===== News Section ===== */
.news-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'Cinzel', serif;
}

.title-icon {
    font-size: 1.2em;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.title-underline {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: 20px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--color-accent);
}

.news-container {
    display: grid;
    gap: 30px;
}

.news-card {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: var(--color-background-card);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    box-shadow: var(--shadow-default);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    transition: width var(--transition-fast);
}

.news-card:hover {
    transform: translateX(10px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-hover), var(--glow-gold);
}

.news-card:hover::before {
    width: 100%;
    opacity: 0.1;
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 15px;
    background: linear-gradient(135deg, var(--color-primary), rgba(0, 0, 0, 0.5));
    border: 2px solid var(--color-accent);
    border-radius: 10px;
    text-align: center;
}

.date-day {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.date-month,
.date-year {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-dark);
}

.news-description {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 15px;
}

.news-link {
    display: inline-block;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.news-link:hover {
    color: var(--color-primary);
    transform: translateX(5px);
}

/* ===== Features Section ===== */
.features-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    background: var(--color-background-card);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-hover), var(--glow-gold);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    filter: drop-shadow(0 5px 15px rgba(255, 215, 0, 0.5));
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(10deg);
}

.feature-title {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-accent);
    font-family: 'Cinzel', serif;
}

.feature-description {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ===== Footer ===== */
.main-footer {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    border-top: 3px solid var(--color-primary);
    padding: 40px 20px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

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

.footer-title {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
}

.footer-description {
    color: var(--color-text-muted);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    font-size: 1.5em;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--color-accent);
    transform: translateY(-5px) rotate(10deg);
    box-shadow: var(--glow-gold);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright,
.disclaimer {
    color: var(--color-text-muted);
    font-size: 0.9em;
    margin: 5px 0;
}

/* ===== Scroll to Top Button ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-primary), rgba(0, 0, 0, 0.8));
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    color: var(--color-text-dark);
    font-size: 1.5em;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-default);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover), var(--glow-gold);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .main-logo {
        width: 400px;
    }
    
    .action-buttons {
        gap: 30px;
    }
    
    .section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .top-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        padding: 30px;
        gap: 20px;
        transition: left var(--transition-normal);
        overflow-y: auto;
    }
    
    .top-menu.active {
        left: 0;
    }
    
    .menu-group {
        flex-direction: column;
        width: 100%;
    }
    
    .menu-item {
        width: 100%;
        justify-content: center;
        padding: 15px;
        font-size: 1.1em;
    }
    
    /* Logo */
    .main-logo {
        width: 300px;
    }
    
    .logo-area {
        padding: 20px;
    }
    
    /* Action Buttons */
    .action-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .action-btn {
        width: 200px;
        height: 130px;
    }
    
    .btn-frame {
        width: 280px;
        height: 180px;
    }
    
    /* News Cards */
    .news-card {
        flex-direction: column;
        gap: 15px;
    }
    
    .news-date {
        min-width: 100%;
        flex-direction: row;
        justify-content: space-around;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.8em;
        flex-direction: column;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .main-logo {
        width: 250px;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .action-btn {
        width: 180px;
        height: 120px;
    }
    
    .btn-frame {
        width: 250px;
        height: 160px;
    }
    
    .text-th {
        font-size: 1.2em;
    }
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}



/* ===== Navbar for Download and Register Pages ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--color-primary);
    box-shadow: var(--shadow-default);
    padding: 15px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    color: var(--color-accent);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.nav-logo img {
    width: 50px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-text-dark);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: inline-flex;          /* เปลี่ยนจาก block */
    align-items: center;           /* เพิ่มใหม่ */
    gap: 5px;                      /* เพิ่มใหม่ */
    padding: 10px 18px;
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap;           /* เพิ่มใหม่ */
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left var(--transition-normal);
}

.nav-menu a:hover::before {
    left: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255, 215, 0, 0.15);
    color: var(--color-accent);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        transition: right 0.3s ease-in-out;
        border-left: 3px solid var(--color-primary);
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 15px;
    }
}

.btn1 .icon1{ vertical-align:-6.5px; }
.btn2 .icon2{ vertical-align:-6.0px; }

