@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;600;800&display=swap');

:root {
    --primary: #00d2ff;
    --secondary: #3a7bd5;
    --accent: #ffd700;
    --bg-dark: #050a18;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0aec0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Be Vietnam Pro', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Image Overlay */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0a192f 0%, #050a18 100%);
    z-index: -2;
}

#bubbleCanvas {
    z-index: -1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(5, 10, 24, 0.8);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Scroll Offset for Anchors */
[id] {
    scroll-margin-top: 100px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10rem 2rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 5rem;
    position: relative;
    text-align: center;
}

.hero-content {
    width: 100%;
    max-width: 800px;
}

.hero-visual {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

.bot-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.3);
    margin-top: 5rem;
    margin-bottom: 2rem;
}

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

.hero h1 {
    font-size: 5.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -3px;
    line-height: 1;
}

.hero p {
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 100%;
    margin-bottom: 3rem;
}

.btn-primary {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 210, 255, 0.4);
}

.btn-footer {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--glass);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.btn-footer:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 210, 255, 0.2);
}

/* Nav Link Active */
.nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.nav-links a.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary);
    margin-top: 5px;
    box-shadow: 0 0 10px var(--primary);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--glass);
    border: 1px dashed var(--glass-border);
    border-radius: 20px;
    margin-top: 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.btn-secondary {
    padding: 0.8rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Modal Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.image-loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image-loaded {
    opacity: 1;
}

/* Click Pulse Effect */
@keyframes cardPulse {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15); }
    50% { transform: scale(0.98); box-shadow: 0 0 40px rgba(0, 210, 255, 0.4); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15); }
}

.pulse-click {
    animation: cardPulse 0.3s ease-out;
}

/* Discord Simulation Styles */
.discord-sim {
    width: 100%;
    background: #313338;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: row; /* Sidebar + Main content */
    aspect-ratio: 16/11;
    text-align: left;
}

.sim-sidebar {
    width: 72px;
    background: #1e1f22;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    gap: 8px;
    flex-shrink: 0;
}

.side-icon {
    width: 48px;
    height: 48px;
    background: #313338;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #dbdee1;
    transition: var(--transition);
    cursor: pointer;
}

.side-icon.discord {
    background: #313338;
    color: #dbdee1;
    margin-bottom: 2px;
}

.side-icon.discord svg {
    width: 28px;
    height: 28px;
}

.side-separator {
    width: 32px;
    height: 2px;
    background: #35363c;
    border-radius: 1px;
    margin-bottom: 2px;
}

.side-icon.server {
    background: #313338;
}

.side-icon.square {
    border-radius: 16px;
}

.side-icon.active {
    background: #5865f2;
    color: white;
    border-radius: 16px;
}

.sim-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sim-header {
    background: #313338;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.sim-dots {
    display: flex;
    gap: 6px;
}

.sim-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.sim-dots span:nth-child(1) { background: #ff5f57; }
.sim-dots span:nth-child(2) { background: #ffbd2e; }
.sim-dots span:nth-child(3) { background: #28c840; }

.sim-title {
    color: #949ba4;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sim-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sim-message {
    display: flex;
    gap: 16px;
    padding: 2px 0;
    animation: messageIn 0.3s ease-out forwards;
    transition: background 0.1s;
}

.sim-message:hover {
    background: rgba(0, 0, 0, 0.05);
}

@keyframes messageIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.sim-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sim-msg-content {
    flex: 1;
}

.sim-user {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sim-user.bot { color: #eb459e; }
.sim-user.member { color: #ffffff; }

.timestamp {
    color: #949ba4;
    font-size: 0.75rem;
    font-weight: 400;
}

.bot-tag {
    background: #5865f2;
    color: white;
    font-size: 0.625rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.mention {
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
}

.mention:hover {
    background: #5865f2;
    color: white;
}

.sim-emoji {
    width: 22px;
    height: 22px;
    vertical-align: bottom;
    margin: 0 2px;
}

.sim-text {
    color: #dbdee1;
    font-size: 0.95rem;
}

.sim-img-result {
    margin-top: 10px;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: imageFadeIn 0.5s ease-out;
}

@keyframes imageFadeIn {
    from { opacity: 0; transform: translateY(5px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sim-input {
    padding: 0 16px 24px;
}

.input-content {
    background: #383a40;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #949ba4;
}

.plus-icon {
    width: 24px;
    height: 24px;
    color: #b5bac1;
    cursor: pointer;
    transition: var(--transition);
}

.plus-icon:hover {
    color: #dbdee1;
}

.enter-badge {
    margin-left: auto;
    background: transparent;
    border: 1px solid #4e5058;
    color: #949ba4;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.6;
}

.typed-text {
    color: #dbdee1;
    font-size: 0.95rem;
}

.sim-input .cursor {
    color: #dbdee1;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.typing-indicator {
    font-size: 0.75rem;
    color: #b5bac1;
    margin-top: 5px;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.2s;
}

.typing-indicator.active {
    opacity: 1;
}


/* Stats Section */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    color: var(--primary);
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem 10rem;
}

/* Search Container */
.search-container {
    max-width: 600px;
    margin: 0 auto 5rem;
    position: relative;
}

#commandSearch {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

#commandSearch:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    pointer-events: none;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 800;
}

/* Commands Grid */
.commands-section {
    margin-bottom: 5rem;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary);
}

.category-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.command-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.command-card::after {
    content: 'Nhấn để xem';
    position: absolute;
    bottom: -30px;
    right: 15px;
    font-size: 0.7rem;
    color: var(--primary);
    transition: var(--transition);
    opacity: 0;
}

.command-card:hover::after {
    bottom: 15px;
    opacity: 1;
}

.command-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.15);
}

.command-trigger {
    font-family: 'monospace';
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.command-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tag New Style */
.tag-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4);
    z-index: 10;
}

/* Currencies Section */
.currency-info {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin-bottom: 5rem;
    flex-wrap: wrap;
}

.currency-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: var(--glass);
    padding: 2rem 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.currency-icon {
    width: 60px;
    height: 60px;
}

.currency-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
}

.currency-details p {
    color: var(--text-muted);
}

/* Animations Trigger */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
}

.modal-loader .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
    filter: drop-shadow(0 0 10px var(--primary));
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.4);
    border: 2px solid var(--glass-border);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal-content img.image-loaded {
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

@media (max-width: 768px) {
    .hero { 
        flex-direction: column; 
        text-align: center; 
        padding: 5rem 1.5rem;
        height: auto;
    }
    .hero h1 { font-size: 3.5rem; }
    .hero p { 
        font-size: 1rem; 
        white-space: normal; 
        max-width: 100%;
        margin-bottom: 2rem;
        margin-left: auto;
        margin-right: auto;
    }
    .stats-container { justify-content: center; gap: 2rem; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .discord-sim { aspect-ratio: 16/12; }
    .sim-header { display: none; }
    
    .currency-info { 
        gap: 1rem; 
        flex-wrap: nowrap; 
    }
    .currency-card {
        padding: 1rem;
        gap: 1rem;
        flex: 1;
        flex-direction: column;
        text-align: center;
    }
    .currency-icon { width: 40px; height: 40px; }
    .currency-details h3 { font-size: 1.1rem; }
    .currency-details p { font-size: 0.8rem; }

    .commands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    .command-card {
        padding: 1rem;
    }
    .command-trigger { font-size: 1rem; }
    .command-desc { font-size: 0.8rem; }
    
    .section-title { font-size: 2rem; margin-bottom: 2.5rem; }

    #commandSearch {
        padding: 0.8rem 1rem 0.8rem 2.5rem;
        font-size: 0.9rem;
    }
    .search-icon {
        left: 1rem;
        font-size: 0.9rem;
    }
    .search-container {
        margin-bottom: 3rem;
    }

    /* Navbar Mobile Fix */
    .navbar {
        padding: 0.8rem 1rem;
    }
    .nav-links {
        gap: 0.8rem;
    }
    .nav-links a {
        font-size: 0.85rem;
    }
    .nav-logo span {
        display: none;
    }

    footer {
        padding: 3rem 1rem !important;
    }

    /* Hide hover text on mobile */
    .command-card::after {
        display: none;
    }

    .category-title {
        font-size: 1.2rem;
        white-space: nowrap;
    }

    .btn-footer {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* Professional Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0a192f 0%, #050a18 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loader-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Global Image Reveal */
.fade-in-ready {
    opacity: 0;
    filter: blur(10px);
    transform: scale(0.9);
    transition: opacity 1s ease-out, transform 1s ease-out, filter 1s ease-out;
}

.fade-in-ready.reveal-visible {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

/* Delay float animation until revealed */
.bot-avatar.reveal-visible {
    animation: float 4s ease-in-out infinite 1s; /* Start after fade-in finishes */
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Scroll Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-top:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.scroll-top svg {
    width: 24px;
    height: 24px;
}
