:root {
    --bg: #0b0b0f;
    --primary: #6c42f5;
    --accent: #f38ba8;
    --cyan: #89b4fa;
    --gold: #ffd700;
    --green: #a6e3a1;
    --red: #ff8080;
    --text: #ffffff;
    --sidebar-w-collapsed: 70px;
    --sidebar-w-expanded: 260px;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.noise-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.05; background: url('https://grainy-gradients.vercel.app/noise.svg'); }

#sidebar-container { position: relative; z-index: 9999; }
.sidebar { position: fixed; top: 0; left: 0; height: 100vh; width: var(--sidebar-w-collapsed); background: rgba(15,15,20,0.6); backdrop-filter: blur(15px); border-right: 1px solid rgba(255,255,255,0.08); z-index: 9999; transition: width 0.4s; display: flex; flex-direction: column; overflow: hidden; }
.sidebar.expanded { width: var(--sidebar-w-expanded); background: #13131a; }
.toggle-btn { height: 70px; display: flex; justify-content: center; align-items: center; cursor: pointer; color: white; flex-shrink: 0;}
.nav-list { flex: 1; padding-top: 10px; display: flex; flex-direction: column; }
.nav-item { height: 55px; display: flex; align-items: center; text-decoration: none; color: #a6adc8; position: relative; transition: 0.2s; white-space: nowrap; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-item .icon { min-width: 70px; display: flex; justify-content: center; font-size: 24px; }
.nav-item .label { opacity: 0; transform: translateX(10px); transition: 0.3s; font-weight: 600; }
.sidebar.expanded .nav-item .label { opacity: 1; transform: translateX(0); }
.sidebar-footer { margin-top: auto; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 10000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-box { background: #1e1e28; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 30px; width: 90%; max-width: 320px; text-align: center; transform: translateY(20px); transition: 0.3s; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-close-btn { background: rgba(255,255,255,0.1); border:none; padding: 12px 0; width: 100%; color: white; border-radius: 12px; cursor: pointer; margin-top: 20px; font-weight: 600; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.lang-card { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 16px; cursor: pointer; transition: 0.2s; border: 1px solid transparent; display: flex; flex-direction: column; gap: 5px; }
.lang-card:hover { border-color: var(--primary); background: rgba(108,66,245,0.15); }
.flag { font-size: 1.5rem; }


.buffer-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    padding-left: 90px;
    box-sizing: border-box;
}

.header-content { text-align: center; margin-bottom: 60px; }
.buffer-title { font-size: 4rem; font-weight: 900; margin: 0; line-height: 1.1; }
.gradient-text { background: linear-gradient(to right, var(--cyan), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.buffer-subtitle { font-size: 1.2rem; color: #a6adc8; margin-top: 15px; }

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    width: 100%;
}

.info-card {
    flex: 1 1 300px;
    max-width: 360px;

    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    text-decoration: none;
    color: white;
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 280px;
    box-sizing: border-box;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-icon-bg {
    width: 60px; height: 60px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    transition: 0.3s;
}
.card-icon-bg span { font-size: 32px; color: white; }

.purple-glow { background: rgba(108, 66, 245, 0.2); box-shadow: 0 0 20px rgba(108, 66, 245, 0.1); }
.blue-glow { background: rgba(137, 180, 250, 0.2); box-shadow: 0 0 20px rgba(137, 180, 250, 0.1); }
.pink-glow { background: rgba(243, 139, 168, 0.2); box-shadow: 0 0 20px rgba(243, 139, 168, 0.1); }
.green-glow { background: rgba(166, 227, 161, 0.2); box-shadow: 0 0 20px rgba(166, 227, 161, 0.1); }
.red-glow   { background: rgba(255, 128, 128, 0.2); box-shadow: 0 0 20px rgba(255, 128, 128, 0.1); }

.info-card:hover .purple-glow { background: var(--primary); box-shadow: 0 0 30px var(--primary); }
.info-card:hover .blue-glow { background: var(--cyan); box-shadow: 0 0 30px var(--cyan); }
.info-card:hover .pink-glow { background: var(--accent); box-shadow: 0 0 30px var(--accent); }
.info-card:hover .green-glow { background: var(--green); box-shadow: 0 0 30px var(--green); }
.info-card:hover .red-glow   { background: var(--red); box-shadow: 0 0 30px var(--red); }

.info-card h3 { font-size: 1.5rem; margin: 0 0 10px 0; font-weight: 700; }
.info-card p { font-size: 1rem; color: #a6adc8; margin: 0; line-height: 1.5; }

.hover-arrow {
    position: absolute; bottom: 40px; right: 40px;
    font-size: 1.5rem; opacity: 0; transform: translateX(-20px);
    transition: 0.4s ease; color: white;
}
.info-card:hover .hover-arrow { opacity: 1; transform: translateX(0); }

@media (max-width: 1200px) {
    .cards-grid {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .cards-grid {
        flex-direction: column;
        align-items: center;
    }
    .info-card {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        top: auto; bottom: 20px; left: 50%; transform: translateX(-50%);
        width: 90% !important; max-width: 400px; height: 65px;
        flex-direction: row; border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.15);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        background: rgba(20, 20, 25, 0.85);
        overflow: visible;
        justify-content: space-around;
        padding: 0 10px;
    }
    .toggle-btn { display: none; }
    .nav-list { flex-direction: row; padding: 0; justify-content: space-between; width: 100%; align-items: center; }
    .nav-item { height: 100%; flex: 1; justify-content: center; flex-direction: column; gap: 0; }
    .nav-item .label { display: none; }
    .nav-item .icon { min-width: auto; font-size: 26px; margin-bottom: 0; }
    .sidebar > div:last-child { margin: 0 !important; display: flex; align-items: center; }

    .buffer-container { padding-left: 20px; padding-bottom: 120px; }
    .buffer-title { font-size: 2.5rem; }

    .info-card { padding: 30px; align-items: center; text-align: center; }
    .hover-arrow { display: none; }
    .card-icon-bg { margin-bottom: 15px; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); border-left: 1px solid rgba(255, 255, 255, 0.05); }
::-webkit-scrollbar-thumb { background: rgba(108, 66, 245, 0.3); border-radius: 10px; border: 2px solid var(--bg); transition: all 0.3s ease; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); box-shadow: 0 0 15px var(--primary); }
html { scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg); }