@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600&display=swap');

:root {
    --bg-main: #06080d;
    --bg-secondary: rgba(12, 16, 26, 0.7);
    --bg-card: rgba(18, 24, 38, 0.6);
    --bg-card-hover: rgba(24, 32, 51, 0.8);
    
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;
    
    --accent-gold: #c6a052;
    --accent-gold-hover: #e0b969;
    --accent-green: #2E5C3E;
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Sarabun', 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--bg-main);
}

/* 3D Background Container */
#vanta-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}

/* Adding an overlay to make text readable */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, rgba(6,8,13,0.3) 0%, rgba(6,8,13,0.9) 100%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', 'Sarabun', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: 3.5rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; letter-spacing: -0.01em; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

.text-gold { color: var(--accent-gold); }
.text-green { color: var(--accent-green); }
.text-muted { color: var(--text-muted); }

.gradient-text {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 10; }
.py-5 { padding: 5rem 0; }
.mb-2 { margin-bottom: 2rem; }
.mt-5 { margin-top: 5rem; }

/* Language Welcome Modal Overlay */
#lang-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(6,8,13,0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center; justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease;
}
.lang-modal-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--accent-gold);
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    box-shadow: 0 0 50px rgba(198, 160, 82, 0.2);
    transform: scale(0.9);
    animation: popIn 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.lang-flags {
    display: flex; gap: 2rem; justify-content: center; margin-top: 3rem;
}
.lang-btn {
    text-decoration: none; color: #fff;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 2rem; border-radius: 15px;
    font-size: 1.2rem; font-weight: 600;
    transition: all 0.4s ease;
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    transform-style: preserve-3d;
}
.lang-btn:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(198, 160, 82, 0.2);
    border-color: var(--accent-gold);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.8) translateY(30px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Logos */
.brand-logo {
    height: 50px; width: auto; border-radius: 50%;
    border: 2px solid var(--accent-gold); padding: 2px;
    background: #fff; transition: var(--transition);
}
.brand-logo:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(198, 160, 82, 0.4); }
.footer-logo { height: 70px; margin-bottom: 1.5rem; }

/* Buttons and Badges */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 1rem 2rem; border-radius: 4px; font-weight: 500;
    text-decoration: none; transition: var(--transition);
    border: 1px solid transparent; cursor: pointer;
    font-family: 'Outfit', 'Sarabun', sans-serif;
}
.btn-primary { background: var(--accent-gold); color: #000; box-shadow: 0 4px 15px rgba(198, 160, 82, 0.2); }
.btn-primary:hover { background: var(--accent-gold-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(198, 160, 82, 0.4); }
.btn-outline { border-color: var(--glass-border); background: var(--glass-bg); color: var(--text-main); }
.btn-outline:hover { border-color: var(--accent-gold); color: var(--accent-gold); }

.badge { display: inline-block; padding: 0.35rem 0.75rem; font-size: 0.8rem; font-weight: 600; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem; }
.badge-dev { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }

/* Header */
header {
    padding: 1rem 0; position: fixed; width: 100%; top: 0; z-index: 100;
    background: rgba(6, 8, 13, 0.6); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border); transition: var(--transition);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo-container { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links li a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 1rem; position: relative; transition: var(--transition); }
.nav-links li a:hover, .nav-links li a.active { color: var(--accent-gold); }
.nav-links li a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -6px; left: 0; background-color: var(--accent-gold); transition: var(--transition); }
.nav-links li a:hover::after, .nav-links li a.active::after { width: 100%; }
.mobile-menu-btn { display: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }

/* Language Switcher in Header */
.lang-switcher select {
    background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--glass-border);
    padding: 0.3rem 0.8rem; border-radius: 5px; font-family: 'Outfit'; cursor: pointer;
    outline: none;
}
.lang-switcher select option { background: #0b0f19; color: #fff; }

/* Hero */
.hero { min-height: 90vh; display: flex; align-items: center; position: relative; padding-top: 100px; }
.hero-content { max-width: 900px; margin: 0 auto; text-align: center; }
.hero p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 800px; margin-inline: auto; }
.hero-btns { display: flex; justify-content: center; gap: 1rem; }

/* Grid and Cards */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
    background: var(--bg-card); backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border); border-radius: 12px;
    padding: 2.5rem; transition: var(--transition); position: relative;
    transform-style: preserve-3d;
}
.card:hover {
    background: var(--bg-card-hover); border-color: rgba(198, 160, 82, 0.4);
    transform: translateY(-8px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}
.card-icon {
    width: 60px; height: 60px; background: rgba(198, 160, 82, 0.1); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--accent-gold); margin-bottom: 1.5rem;
}

/* News Section */
.news-item { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--glass-border); }
.news-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.news-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.news-title { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-main); text-decoration: none; transition: var(--transition); display: block; }
.news-title:hover { color: var(--accent-gold); }
.news-excerpt { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
footer { background: var(--bg-secondary); backdrop-filter: blur(10px); padding: 5rem 0 2rem; border-top: 1px solid var(--glass-border); position: relative; z-index: 10; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3rem; margin-bottom: 4rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: #fff; font-size: 1.1rem; }
.footer-col p, .footer-col a { color: var(--text-muted); text-decoration: none; margin-bottom: 0.75rem; display: block; font-size: 0.95rem; transition: var(--transition); }
.footer-col a:hover { color: var(--accent-gold); padding-left: 5px; }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.9rem; }

/* Intro Section */
.intro-section { display: flex; align-items: center; justify-content: space-between; gap: 4rem; }
.intro-text { flex: 1; }
.intro-stats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* Interactive 3D Stat Boxes */
.stat-box {
    background: var(--bg-card); border: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem 1.5rem; text-align: center; border-radius: 16px;
    cursor: pointer; cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23c6a052" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>') 12 12, pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    position: relative; overflow: hidden;
}
.stat-box::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: shine 6s infinite;
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }
.stat-box:hover {
    transform: translateY(-15px) scale(1.05);
    background: rgba(198, 160, 82, 0.1);
    border-color: var(--accent-gold);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.stat-box h3 { font-size: 2.5rem; color: var(--accent-gold); margin-bottom: 0.5rem; transition: var(--transition); }
.stat-box:hover h3 { font-size: 2.8rem; text-shadow: 0 0 20px var(--accent-gold); }
.stat-box p { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

/* Global Info Modal */
.info-modal-wrapper {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(25px);
    z-index: 10000; opacity: 0; visibility: hidden; transition: all 0.4s ease;
    display: flex; align-items: center; justify-content: center;
}
.info-modal-wrapper.active { opacity: 1; visibility: visible; }
.info-modal-content {
    background: linear-gradient(135deg, rgba(12,16,26,0.95), rgba(6,8,13,0.95));
    border: 1px solid var(--accent-gold); border-radius: 20px;
    width: 90%; max-width: 700px; padding: 4rem; position: relative;
    transform: scale(0.7) translateY(50px); opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(198, 160, 82, 0.2), inset 0 0 20px rgba(255,255,255,0.05);
}
.info-modal-wrapper.active .info-modal-content { transform: scale(1) translateY(0); opacity: 1; }
.close-modal {
    position: absolute; top: 1.5rem; right: 2rem; color: #fff;
    font-size: 2rem; cursor: pointer; transition: var(--transition);
}
.close-modal:hover { color: var(--accent-gold); transform: rotate(90deg); }
.modal-data h2 { color: var(--accent-gold); font-size: 2.5rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(198,160,82,0.3); padding-bottom: 1rem; }
.modal-data p { font-size: 1.15rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; }
.modal-data ul { margin-left: 1.5rem; color: var(--text-main); font-size: 1.1rem; line-height: 1.8; }
.modal-data ul li { margin-bottom: 0.5rem; }

/* Animations */
.animate { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.animate.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    .intro-section { flex-direction: column; }
    .grid-2 { grid-template-columns: 1fr; }
    h1 { font-size: 2.5rem; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-secondary); flex-direction: column; padding: 2rem; gap: 1.5rem; border-bottom: 1px solid var(--glass-border); }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { display: block; }
    .lang-switcher select { display: block; width: 100%; padding: 0.8rem; }
    .lang-flags { flex-direction: column; }
}
