/* ================================================================
   VANGUARD THEME - CONFIGURATION (CLOUDYMEADOW VERSION)
   ================================================================ */

:root {
    --bg-dark: #050505;
    --bg-card: #0c0c0c;
    --gold: #7ec2eb;        /* Màu xanh sáng lấy từ thân logo chú cừu */
    --gold-hover: #a3d5f3;  /* Màu xanh nhạt hơn khi di chuột vào nút */
    --border: rgba(126, 194, 235, 0.15); /* Viền xanh trong suốt nhẹ nhàng */
    --font-main: 'Inter', sans-serif;
    --font-title: 'Oswald', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: #ffffff;
    overflow-x: hidden;
}

/* Background */
.bg-vignette {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 0%, #000 90%);
    z-index: -1; pointer-events: none;
}
.particles-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2; background: #080808; overflow: hidden;
}
.particle {
    position: absolute; 
    background: rgba(126, 194, 235, 0.05); /* ĐỒNG BỘ: Đổi sang hạt bay màu xanh nhẹ */
    border: 1px solid rgba(126, 194, 235, 0.1); /* ĐỒNG BỘ: Viền hạt bay màu xanh */
    bottom: -50px; animation: riseUp linear infinite;
}
@keyframes riseUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 5, 0.95); border-bottom: 1px solid var(--border);
    padding: 15px 5%; display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { font-family: var(--font-title); font-size: 1.6rem; color: #fff; text-decoration: none; font-weight: 700; }
.nav-logo span { color: var(--gold); }

.nav-menu { display: flex; list-style: none; gap: 25px; }
.nav-menu a { color: #aaa; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.3s; text-transform: uppercase; }
.nav-menu a:hover { color: var(--gold); }

/* Hero */
#hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 80px; }
.hero-logo { 
    max-width: 320px; 
    margin-bottom: 2rem; 
    filter: drop-shadow(0 0 40px rgba(126, 194, 235, 0.25)); /* ĐỒNG BỘ: Đổi bóng mờ hào quang sang xanh */
    animation: float 6s infinite ease-in-out; 
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.hero-subtitle { color: #ccc; margin-bottom: 2rem; font-size: 1.1rem; }

.ip-wrapper {
    background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    border-radius: 50px; display: flex; overflow: hidden; cursor: pointer;
    transition: 0.3s; margin-bottom: 20px;
}
.ip-wrapper:hover { border-color: var(--gold); box-shadow: 0 0 25px rgba(126, 194, 235, 0.15); transform: scale(1.02); }
.ip-content { padding: 12px 25px; display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: monospace; font-size: 1.1rem; }
.ip-action { background: var(--gold); color: #000; padding: 12px 25px; font-weight: 800; font-family: var(--font-title); transition: 0.3s; }
.ip-wrapper.copied { border-color: #2ecc71; }
.ip-wrapper.copied .ip-content { color: #2ecc71; }
.ip-wrapper.copied .ip-action { background: #2ecc71; color: #fff; }

/* ================================================================
   AUTH SECTION - DISCORD OVERRIDES
   ================================================================ */
.auth-btn-discord {
    border-color: rgba(88, 101, 242, 0.4);
}
.auth-btn-discord .ip-content {
    color: #5865F2;
    font-weight: 600;
}
.auth-btn-discord .ip-action {
    background: #5865F2;
    color: #ffffff;
}
.auth-btn-discord:hover {
    border-color: #5865F2;
    box-shadow: 0 0 25px rgba(88, 101, 242, 0.3);
}

#auth-loading-box .ip-content {
    color: var(--gold);
}

#discord-auth-section .ip-wrapper {
    align-items: center;
    justify-content: center;
}

.online-status { font-size: 0.9rem; color: #666; display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.dot { width: 8px; height: 8px; background: #2ecc71; border-radius: 50%; box-shadow: 0 0 5px #2ecc71; }
.social-bar { display: flex; gap: 20px; }
.social-icon { color: #888; font-size: 1.4rem; transition: 0.3s; }
.social-icon:hover { color: var(--gold); transform: translateY(-3px); }

/* General Sections */
section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-family: var(--font-title); font-size: 2.5rem; color: var(--gold); }
.gold-line { width: 60px; height: 3px; background: var(--gold); margin: 10px auto; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }

/* Staff */
.staff-card {
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 30px; border-radius: 15px; text-align: center; transition: 0.3s;
}
.staff-card:hover { transform: translateY(-10px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.staff-head { width: 80px; border-radius: 15px; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.staff-name { font-size: 1.2rem; font-weight: 700; color: #fff; }
.staff-role { color: var(--gold); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; margin: 5px 0 10px; }
.staff-bio { color: #888; font-size: 0.9rem; }

/* REGLAS (Hover Effect) */
.rule-card {
    background: var(--bg-card); border-left: 3px solid var(--gold);
    border: 1px solid var(--border); border-left-width: 3px;
    padding: 25px; border-radius: 5px; transition: all 0.3s ease;
}
.rule-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 5px 20px rgba(126, 194, 235, 0.1); background: #111; }
.rule-card h3 { color: var(--gold); font-family: var(--font-title); margin-bottom: 10px; font-size: 1.3rem; }
.rule-card p { color: #aaa; font-size: 0.95rem; }

/* FAQ (Smooth Accordion Grid Trick) */
.faq-grid { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.faq-item {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 8px; overflow: hidden; transition: 0.3s;
}
.faq-item:hover { border-color: var(--gold); } /* ĐỒNG BỘ: Đổi viền hover FAQ sang xanh */
.faq-item.active { border-color: var(--gold); background: #0e0e0e; }

.faq-header { padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-q { color: #fff; font-weight: 600; font-size: 1.05rem; }
.faq-icon { color: var(--gold); transition: 0.3s; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

.faq-body {
    display: grid; 
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.4s ease-out; /* Animación Suave */
    background: rgba(0,0,0,0.2);
}
.faq-item.active .faq-body { grid-template-rows: 1fr; }
.faq-inner { overflow: hidden; }
.faq-a { padding: 20px; padding-top: 0; color: #aaa; font-size: 0.95rem; line-height: 1.6; }
.faq-item.active .faq-a { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05); }

/* Thêm class bổ trợ cho code lệnh trong FAQ */
.faq-a code {
    background: rgba(126, 194, 235, 0.1);
    color: var(--gold);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Legal Tabs */
.legal-box-wrapper { max-width: 900px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; }
.legal-tabs { display: flex; border-bottom: 1px solid var(--border); background: rgba(0,0,0,0.3); }
.l-tab { flex: 1; padding: 18px; background: transparent; color: #888; border: none; cursor: pointer; font-weight: 700; transition: 0.3s; font-size: 0.95rem; border-right: 1px solid rgba(255,255,255,0.05); }
.l-tab:last-child { border-right: none; }
.l-tab:hover { color: #fff; background: rgba(255,255,255,0.02); }
.l-tab.active { background: rgba(126, 194, 235, 0.08); color: var(--gold); border-bottom: 2px solid var(--gold); }
.legal-content { padding: 40px; color: #ccc; line-height: 1.8; }
.l-content { display: none; animation: fadeIn 0.4s; }
.l-content.active { display: block; }
@keyframes fadeIn { from{opacity:0; transform: translateY(10px);} to{opacity:1; transform: translateY(0);} }

footer { padding: 50px 20px; text-align: center; border-top: 1px solid var(--border); margin-top: 80px; background: #000; }

@media (max-width: 768px) {
    .nav-menu { display: none; }
    #hero { padding-top: 100px; }
    .ip-wrapper { flex-direction: column; width: 100%; }
    .legal-tabs { flex-direction: column; }
    .l-tab { border-right: none; border-bottom: 1px solid var(--border); }
}
/* ================================================================
   CLOUDYMEADOW FLOATING SUPPORT WIDGET STYLES
   ================================================================ */
#cm-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px; /* Vị trí mặc định lúc đầu */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    /* TỐI ƯU: Đổi sang center để dù kéo sang trái hay phải menu vẫn mở thẳng hàng không bị lệch */
    align-items: center; 
    gap: 15px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none; /* Ngăn scroll mặc định khi kéo trên mobile */
}

/* Trạng thái ẩn ban đầu để chạy animation xuất hiện mượt */
.cm-widget-hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
}

.cm-widget-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Nút bong bóng chính */
#cm-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(12, 12, 12, 0.6); /* --bg-card kèm alpha */
    border: 1px solid var(--border);
    color: var(--gold);
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s, box-shadow 0.3s;
}

#cm-widget-toggle:hover {
    transform: scale(1.08);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(126, 194, 235, 0.3);
}

#cm-widget-toggle:active {
    transform: scale(0.92);
}

/* Menu nổi rộng ra */
#cm-widget-menu {
    background: rgba(12, 12, 12, 0.85); /* Glassmorphism đậm màu hơn để đọc chữ rõ */
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cm-widget-menu-closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px) scale(0.9);
}

.cm-widget-menu-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Items bên trong menu */
.cm-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #cccccc;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.cm-widget-item:hover {
    background: rgba(126, 194, 235, 0.1); /* Hover ăn theo tone màu chủ đạo */
    color: #ffffff;
    transform: translateX(-3px);
}

.cm-widget-icon {
    font-size: 1.1rem;
}

/* Tối ưu hóa trên các thiết bị màn hình nhỏ */
@media (max-width: 768px) {
    #cm-widget-container {
        bottom: 20px;
        right: 20px;
    }
    #cm-widget-toggle {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
}
