/* ==========================================================================
   🌐 GLOBAL RE-ENGINEERED ULTRA-MINIMALIST NAVBAR (SCREENSHOT LOCK)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@500;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* [1] DEFAULT SLATE DARK (GitHub Style - Soft Blue) */
:root,
html.default-dark {
    --bg-global: #0d1117;
    --bg-card: #161b22;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --color-accent: #58a6ff;
    --border-accent: rgba(88, 166, 255, 0.15);
    /* Halka border */
}

/* [2] CARBON BLACK (Vercel Style - Pure B&W) */
html.carbon-black {
    --bg-global: #000000;
    --bg-card: #0a0a0a;
    --text-main: #ededed;
    --text-muted: #a1a1aa;
    --color-accent: #ffffff;
    --border-accent: rgba(255, 255, 255, 0.15);
}

/* [3] DEEP OCEAN (VS Code Style - Calming Cyan) */
html.deep-ocean {
    --bg-global: #030712;
    --bg-card: #081225;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --color-accent: #22d3ee;
    --border-accent: rgba(34, 211, 238, 0.15);
}

/* ==========================================================================
   🧱 APPLY VARIABLES TO GLOBAL ELEMENTS (FORCING THE THEME)
   ========================================================================== */

/* Background aur Text */
html,
body {
    background-color: var(--bg-global) !important;
    color: var(--text-main) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headers aur Cards */
.main-header {
    position: sticky;
    top: 20px;
    /* Screen ke top se thoda niche */
    z-index: 1000;
    padding: 0 20px;
    background: transparent !important;
    /* Wrapper ka khud ka background clear karo */
    border: none !important;
}

.tech-box,
.quality-card,
.profile-capsule,
.profile-card,
.cyber-config-card,
.config-block {
    background-color: var(--bg-card) !important;
    border-color: var(--border-accent) !important;
    transition: all 0.3s ease;
}

/* Text colors */
.text-muted,
p,
.section-desc,
.section-heading {
    color: var(--text-muted) !important;
}

/* Buttons aur Inputs ko bhi Theme ke rang me dhalo! */
.btn-cyber-submit,
.btn-enter-compiler {
    color: var(--color-accent) !important;
    border-color: var(--border-accent) !important;
}

.btn-cyber-submit:hover,
.btn-enter-compiler:hover {
    background: var(--border-accent) !important;
    color: var(--text-main) !important;
    box-shadow: 0 0 20px var(--border-accent) !important;
}

.hacker-input {
    color: var(--color-accent) !important;
}

.input-wrapper:focus-within {
    border-left-color: var(--color-accent) !important;
}

/* ==========================================================================
   🧱 APPLY VARIABLES TO GLOBAL ELEMENTS
   ========================================================================== */

/* Pura website ka background aur text automatic variables se chalega */
body {
    background-color: var(--bg-global) !important;
    color: var(--text-main) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Rang badalte waqt smooth animation */
}

/* Top Navbar settings wrapper */
.main-header {
    position: sticky;
    top: 20px;
    /* Screen ke top se thoda niche */
    z-index: 1000;
    padding: 0 20px;
    background: transparent !important;
    /* Wrapper ka khud ka background clear karo */
    border: none !important;
}

/* Baki saare pages ke cards ko automatic rang dene ke liye */
.tech-box,
.quality-card,
.profile-capsule,
.profile-card,
.cyber-config-card,
.config-block {
    background-color: var(--bg-card) !important;
    border-color: var(--border-accent) !important;
}

/* Text aur secondary buttons ka setup */
.text-muted,
p,
.section-desc {
    color: var(--text-muted) !important;
}

:root {
    --bg-dark: #0b0b0b;
    --accent-green: #00ffaa;
    --text-white: #ffffff;
    --text-dim: #7f8ea3;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

/* Base resets across components */
header.main-header {
    width: 100%;
    height: 80px;
    /* Forces layout background consistency */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    /* Crisp micro divider */
    box-sizing: border-box;
}

/* Master alignment container syncing logic */
.header-container {
    max-width: 1000px;
    /* Jyada lamba mat karo, compact premium lagta hai */
    margin: 0 auto;

    /* Frosted Glass Effect */
    background: rgba(10, 10, 15, 0.4) !important;
    /* Semi-transparent dark */
    backdrop-filter: blur(16px);
    /* Apple jaisa blur effect */
    -webkit-backdrop-filter: blur(16px);

    /* Sleek Borders & Shadows */
    border: 1px solid var(--border-accent);
    border-radius: 16px;
    /* Smooth rounded corners */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);

    /* Flexbox setup */
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

/* 💻 LEFT LOGO PANEL: FIXED TEXT DISAPPEARANCE */
.logo-area {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-green) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    user-select: none;
}

/* High contrast white color override to bring the text back */
.logo-area .logo-text {
    color: #ffffff !important;
    display: inline-block !important;
    margin: 0 4px;
    font-weight: 700;
}

.logo-area .bracket {
    color: var(--accent-green) !important;
    font-weight: 500;
}

.cursor-blink {
    color: var(--accent-green) !important;
    animation: headerCursorBlink 1s infinite alternate;
}

/* 📡 RIGHT INTERFACE NAVIGATION */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 35px;
}

.menu-item {
    text-decoration: none;
    font-family: var(--font-sans);
    color: var(--text-dim);
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: var(--text-white);
}

/* 🎯 SOLID NEON LOGIN BUTTON CONTAINER BOX STYLE */
.btn-header-login {
    background: transparent;
    color: var(--accent-green);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border: 1px solid var(--accent-green);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-header-login:hover {
    background: rgba(0, 255, 170, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.3);
}

@keyframes headerCursorBlink {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Strict mobile framing viewports handles */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }

    .menu-item {
        display: none;
    }



    /* Hide raw words links on small screens */
}


/* ==========================================================================
   🔔 PREMIUM TECH TOAST NOTIFICATION SYSTEM (UPGRADED UI)
   ========================================================================== */

.custom-toast {
    position: fixed;
    bottom: -100px;
    /* Shuruat me screen ke neeche chhupa rahega */
    left: 50%;
    transform: translateX(-50%);
    background: #0d1117;
    /* Dark slate backend slate */
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 28px;
    border-radius: 10px;
    font-family: 'Fira Code', monospace;
    /* Professional coding font vibe */
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    z-index: 10005;
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: none;
    transition: bottom 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    /* Ultra smooth ease-out slide */
}

/* Toast active hone par smoothly upar slide hoga */
.custom-toast.show {
    bottom: 40px;
}

/* Toast ke andar ke text style ko clean rakho */
.custom-toast span {
    display: inline-flex;
    align-items: center;
}

/* 🟢 SUCCESS TOAST: NEON GREEN GLOW MATRIX */
.toast-success {
    border: 1px solid rgba(0, 255, 170, 0.3);
    border-left: 4px solid #00ffaa;
    box-shadow: 0 0 40px rgba(0, 255, 170, 0.06), 0 20px 50px rgba(0, 0, 0, 0.7);
}

.toast-success span:first-child {
    color: #00ffaa;
    filter: drop-shadow(0 0 8px rgba(0, 255, 170, 0.6));
}

/* ❌ ERROR TOAST: DANGER RED GLOW MATRIX */
.toast-error {
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.06), 0 20px 50px rgba(0, 0, 0, 0.7);
}

.toast-error span:first-child {
    color: #ef4444;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6));
}

/* ==========================================================================
   🔲 PREMIUM CYBER TERMINAL GLOBAL MODAL SYSTEM (UPGRADED)
   ========================================================================== */

.global-modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 9, 14, 0.88);
    /* Ekdum deep dark premium space */
    backdrop-filter: blur(12px) saturate(160%);
    /* Extra smooth premium blur effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Modal activate hone par smoothly fade-in hoga */
.global-modal-wrapper.modal-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.global-modal-card {
    background: #0d1117;
    /* Slate dark coding engine color */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px 35px;
    max-width: 420px;
    width: 85%;
    text-align: center;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.global-modal-wrapper.modal-active .global-modal-card {
    transform: translateY(0) scale(1);
}

/* Top Icon Module Animation */
.global-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* Headings with premium monospace font */
.global-modal-card h3 {
    margin: 0 0 12px 0;
    font-family: 'Fira Code', monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-transform: uppercase;
}

/* Simple descriptive text block */
.global-modal-card p {
    margin: 0 0 30px 0;
    font-size: 0.92rem;
    color: #8b949e;
    line-height: 1.6;
    font-weight: 500;
}

/* Bottom Actions grid placement */
.global-modal-btn-row {
    display: flex;
    gap: 16px;
}

/* CANCEL / BACK Button Styling */
.btn-modal-back {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    color: #c9d1d9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-modal-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Primary Action Core Button Layout */
.btn-modal-action {
    flex: 1;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

/* 🔴 THEME 1: DANGER GLOW MATRIX (Logout, Delete, Reset) */
.theme-danger .global-modal-card {
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.08), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.theme-danger .global-modal-card h3 {
    color: #ff6b6b;
}

.theme-danger .btn-modal-action {
    background: #ef4444;
}

.theme-danger .btn-modal-action:hover {
    background: #f87171;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.45);
    transform: translateY(-1px);
}

/* 🟢 THEME 2: SUCCESS NEON MATRIX (Level Up, System Saved) */
.theme-success .global-modal-card {
    border: 1px solid rgba(0, 255, 170, 0.25);
    box-shadow: 0 0 50px rgba(0, 255, 170, 0.08), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.theme-success .global-modal-card h3 {
    color: #00ffaa;
}

.theme-success .btn-modal-action {
    background: #00ffaa;
    color: #05070f;
}

.theme-success .btn-modal-action:hover {
    background: #33ffbb;
    box-shadow: 0 0 25px rgba(0, 255, 170, 0.45);
    transform: translateY(-1px);
}

/* 🔵 THEME 3: INFO CYBER MATRIX (Rules, Workspace Tips) */
.theme-info .global-modal-card {
    border: 1px solid rgba(58, 140, 255, 0.25);
    box-shadow: 0 0 50px rgba(58, 140, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.theme-info .global-modal-card h3 {
    color: #58a6ff;
}

.theme-info .btn-modal-action {
    background: #1f6feb;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-info .btn-modal-action:hover {
    background: #388bfd;
    box-shadow: 0 0 25px rgba(58, 140, 255, 0.45);
    transform: translateY(-1px);
}

/* ==========================================================================
   📱 GLOBAL MODAL & TOAST MOBILE REPAIR (MAX-WIDTH: 480px)
   ========================================================================== */
@media (max-width: 480px) {

    /* 🔲 MODAL MOBILE FIXES */
    .global-modal-card {
        width: 92% !important;
        /* Screen ke edges se thoda andar rakhega */
        padding: 28px 20px !important;
        border-radius: 14px !important;
    }

    .global-modal-icon {
        font-size: 2rem !important;
        /* Icon thoda chota kiya */
        margin-bottom: 16px !important;
    }

    .global-modal-card h3 {
        font-size: 1.15rem !important;
    }

    .global-modal-card p {
        font-size: 0.85rem !important;
        margin-bottom: 24px !important;
    }

    /* Buttons ko side-by-side se hata kar thumb-friendly vertical stack kiya */
    .global-modal-btn-row {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .btn-modal-back,
    .btn-modal-action {
        width: 100% !important;
        padding: 14px !important;
        font-size: 0.9rem !important;
    }

    /* 🔔 TOAST MOBILE FIXES */
    .custom-toast {
        width: 90% !important;
        /* Toast phone ki width ke hisab se set hoga */
        max-width: 380px !important;
        padding: 14px 18px !important;
        font-size: 0.8rem !important;
        gap: 12px !important;
        border-radius: 8px !important;
        /* Mobile par bottom se thoda upar rakhenge taaki phone ke navigation bar se na takraye */
        bottom: -100px !important;
    }

    .custom-toast.show {
        bottom: 25px !important;
        /* Active hone par yahan aakar rukega */
    }
}


/* ==========================================================================
   🧭 GLOBAL NAVIGATION HUB (DESKTOP & MOBILE)
   ========================================================================== */

.nav-menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Base style for Navigation Buttons */
.nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #8b949e;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

/* Jab user us page par ho (Active State - Neon Green Glow) */
.nav-btn.active {
    background: rgba(0, 255, 170, 0.1);
    border-color: rgba(0, 255, 170, 0.3);
    color: #00ffaa;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.1);
}

/* 📱 MOBILE RESPONSIVE NAV FIX */
/* 📱 MOBILE RESPONSIVE NAV FIX (COMPACT SIZE) */
@media (max-width: 600px) {

    /* Buttons ke beech ka gap thoda kam kiya */
    .nav-menu {
        gap: 6px;
    }

    /* Padding ko chota kiya taaki dabba tight ho jaye */
    .nav-btn {
        padding: 6px 5px;
        border-radius: 6px;
        /* Chote button par thoda sharp border acha lagta hai */
    }

    /* Text gayab */
    .nav-text {
        display: none;
    }

    /* Icon ka size normal se thoda chota kiya */
    .nav-icon {
        font-size: 10px;
    }
}

/* ==========================================================================
   🧭 DYNAMIC THEME FOR NAVBAR & LOGO
   ========================================================================== */

/* Logo ke brackets aur blinking cursor ko theme ke color se jodo */
.bracket,
.cursor-blink {
    color: var(--color-accent) !important;
    transition: color 0.3s ease;
}

/* Nav buttons ka normal text */
.nav-btn {
    color: var(--text-muted) !important;
}

/* Nav button par mouse le jane par (Hover) */
.nav-btn:hover {
    background: var(--border-accent) !important;
    color: var(--text-main) !important;
    border-color: var(--color-accent) !important;
}

/* Jo page abhi khula hai (Active Button) ka dhansu glow */
.nav-btn.active {
    background: var(--border-accent) !important;
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
    box-shadow: 0 0 15px var(--border-accent) !important;
}

@media (max-width: 600px) {
    .main-header {
        top: 10px;
        /* Phone par top se gap kam karo */
        padding: 0 12px;
        /* Side se gap kam karo */
    }

    .header-container {
        padding: 10px 14px;
        border-radius: 12px;
        /* Phone par thode chote corners */
    }

    .logo-text,
    .logo-area {
        font-size: 15px;
    }

    .btn-header-login {
        background: transparent;
        color: var(--accent-green);
        font-family: var(--font-sans);
        font-size: 8px;
        font-weight: 600;
        letter-spacing: 0.5px;
        padding: 8px 12px;
        border: 1px solid var(--accent-green);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
    }
}

.community-float-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-pink));
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.community-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 85, 0.6);
}

/* ==========================================================================
   🚨 NAVBAR ADMIN BUTTON (IMAGE STYLE)
   ========================================================================== */
.admin-nav-btn {
    background-color: #ffffff;
    /* Image jaisa white background */
    color: #000000;
    /* Black text */
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    /* Halka square look */

    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;

    cursor: pointer;
    transition: all 0.3s ease;

    /* Center text aur icon ke liye */
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    /* Community button se thoda gap */
}

/* Hover par thoda premium feel dene ke liye */
.admin-nav-btn:hover {
    background-color: var(--neon-pink, #ff0055);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    transform: translateY(-2px);
}