/* --- ROOT VARIABLES --- */
:root {
    --bg: #050505;
    --card-bg: #0d0d0d;
    --card-bg2: #111;
    --accent: #00d4ff;
    --accent-dark: #0088cc;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.3);
    --danger: #ff4444;
    --danger-glow: rgba(255, 68, 68, 0.3);
    --warning: #ffaa00;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --text-light: #cccccc;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 212, 255, 0.4);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- GLOBAL STYLES --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Apply Inter only to normal elements; NOT ::before/::after so FA icons render */
body, input, textarea, select, button, label, span, div, p, h1, h2, h3, h4, h5, h6,
a, li, td, th, nav, section, article, header, footer, main {
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

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

a { text-decoration: none; }

/* --- NAVIGATION --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 6%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 2px;
    text-shadow: 0 0 12px var(--accent-glow);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.8rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-links a:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-links a i { font-size: 0.9rem; }

.nav-btn {
    background: var(--accent);
    color: #000 !important;
    padding: 9px 18px;
    border-radius: 8px;
    box-shadow: 0 0 15px var(--accent-glow);
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-btn:hover {
    background: var(--text-white);
    box-shadow: 0 0 25px var(--accent);
    transform: translateY(-1px);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* --- MOBILE TOGGLE --- */
.menu-toggle {
    display: none;
    font-size: 1.4rem;
    color: var(--accent);
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #111;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.toast.visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 3px solid var(--success);
}
.toast-success i { color: var(--success); font-size: 1rem; }

.toast-error {
    border-left: 3px solid var(--danger);
}
.toast-error i { color: var(--danger); font-size: 1rem; }

.toast-info {
    border-left: 3px solid var(--accent);
}
.toast-info i { color: var(--accent); font-size: 1rem; }

.toast-warning {
    border-left: 3px solid var(--warning);
}
.toast-warning i { color: var(--warning); font-size: 1rem; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #001a33 0%, #050505 100%);
    text-align: center;
    padding: 0 5%;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    animation: fadeInDown 1s ease-out;
    line-height: 1.1;
}

.typewriter {
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    min-height: 1.5rem;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-secondary, .btn-dev {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { transform: scale(1.04); box-shadow: 0 0 30px var(--accent); }

.btn-secondary { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: var(--accent); transform: scale(1.02); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 0 20px var(--danger-glow); transform: scale(1.02); }

.btn-success { background: var(--success); color: #000; }
.btn-success:hover { box-shadow: 0 0 20px var(--success-glow); transform: scale(1.02); }

/* --- METRICS BAR --- */
.metrics-bar {
    display: flex;
    justify-content: space-around;
    padding: 60px 10%;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.metric { display: flex; align-items: center; gap: 20px; }
.metric i { font-size: 2.5rem; color: var(--accent); animation: pulse 2s infinite; }
.metric-data .value { display: block; font-size: 1.8rem; font-weight: 800; }
.metric-data .label { color: var(--text-gray); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* --- FEATURE CARDS --- */
.features { padding: 100px 10%; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 60px; font-weight: 800; }
.section-title i { color: var(--accent); margin-right: 12px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    padding: 40px 32px;
    border-radius: 18px;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-icon i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 { margin-bottom: 12px; font-size: 1.35rem; font-weight: 700; }
.feature-card p { color: var(--text-gray); margin-bottom: 20px; font-size: 0.95rem; }

.card-list { list-style: none; }
.card-list li { margin-bottom: 8px; font-size: 0.88rem; color: var(--text-light); }
.card-list li i { color: var(--accent); margin-right: 8px; }

/* --- STATUS BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(0, 230, 118, 0.15); color: var(--success); border: 1px solid rgba(0, 230, 118, 0.3); }
.badge-danger { background: rgba(255, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(255, 68, 68, 0.3); }
.badge-warning { background: rgba(255, 170, 0, 0.15); color: var(--warning); border: 1px solid rgba(255, 170, 0, 0.3); }
.badge-info { background: rgba(0, 212, 255, 0.15); color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.3); }

/* --- DEVELOPER PORTAL STYLES --- */
.dev-portal-body {
    padding-top: 80px;
    min-height: 100vh;
}

.dev-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #001a33 100%);
    border-bottom: 1px solid var(--border);
    padding: 50px 6% 40px;
}

.dev-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.dev-header h1 span { color: var(--accent); }
.dev-header p { color: var(--text-gray); font-size: 0.95rem; }

.dev-content {
    padding: 40px 6%;
    max-width: 1400px;
    margin: 0 auto;
}

.dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: border-color 0.3s, transform 0.3s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(0, 212, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    flex-shrink: 0;
}

.stat-icon.danger { background: rgba(255, 68, 68, 0.1); color: var(--danger); }
.stat-icon.success { background: rgba(0, 230, 118, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(255, 170, 0, 0.1); color: var(--warning); }

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dev-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-section-title i { color: var(--accent); }

.dev-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.guild-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.guild-list::-webkit-scrollbar { width: 5px; }
.guild-list::-webkit-scrollbar-track { background: transparent; }
.guild-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.guild-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.3s;
}

.guild-item:hover { border-color: var(--border-hover); }

.guild-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guild-item .guild-info { flex: 1; min-width: 0; }
.guild-item .guild-name { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-item .guild-members { font-size: 0.75rem; color: var(--text-gray); }

.log-area {
    background: #050505;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-height: 500px;
    overflow-y: auto;
    color: var(--text-gray);
    line-height: 1.8;
}

.log-area::-webkit-scrollbar { width: 5px; }
.log-area::-webkit-scrollbar-track { background: transparent; }
.log-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.log-entry { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.log-entry.log-info { color: var(--accent); }
.log-entry.log-warn { color: var(--warning); }
.log-entry.log-error { color: var(--danger); }
.log-entry.log-success { color: var(--success); }

/* Thin scrollbars for all dev dashboard scroll containers */
#devlist-container::-webkit-scrollbar,
#premium-list-container::-webkit-scrollbar,
#premium-logs-container::-webkit-scrollbar,
#featured-servers-list::-webkit-scrollbar,
#team-list-container::-webkit-scrollbar,
#reports-container::-webkit-scrollbar,
#ai-block-container::-webkit-scrollbar { width: 5px; }
#devlist-container::-webkit-scrollbar-track,
#premium-list-container::-webkit-scrollbar-track,
#premium-logs-container::-webkit-scrollbar-track,
#featured-servers-list::-webkit-scrollbar-track,
#team-list-container::-webkit-scrollbar-track,
#reports-container::-webkit-scrollbar-track,
#ai-block-container::-webkit-scrollbar-track { background: transparent; }
#devlist-container::-webkit-scrollbar-thumb,
#premium-list-container::-webkit-scrollbar-thumb,
#premium-logs-container::-webkit-scrollbar-thumb,
#featured-servers-list::-webkit-scrollbar-thumb,
#team-list-container::-webkit-scrollbar-thumb,
#reports-container::-webkit-scrollbar-thumb,
#ai-block-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* --- DEVELOPER SECTION (homepage) --- */
.dev-info { padding: 100px 10%; background: #000; }
.dev-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background: linear-gradient(145deg, #0d0d0d, #050505);
    padding: 60px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.dev-preview {
    background: #111;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #222;
    flex: 1;
    font-family: 'Courier New', monospace;
    color: var(--accent);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    overflow-x: auto;
}

/* --- FOOTER --- */
.main-footer {
    background: #000;
    padding: 80px 10% 50px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-nav h4 { margin-bottom: 20px; font-size: 1rem; color: var(--accent); }
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 12px; }
.footer-nav a { text-decoration: none; color: var(--text-gray); transition: color 0.3s; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text-white); }

.social-links { display: flex; gap: 16px; margin-top: 20px; }
.social-links a { font-size: 1.4rem; color: var(--text-gray); transition: color 0.3s, transform 0.3s; }
.social-links a:hover { color: var(--accent); transform: scale(1.2); }

.discord-sub-btn { display:inline-flex; align-items:center; gap:8px; padding:10px 18px; background:var(--accent, #00d4ff); color:#fff; border:none; border-radius:8px; font-size:.9rem; font-weight:600; cursor:pointer; text-decoration:none; transition:opacity .2s; }
.discord-sub-btn:hover { opacity:.85; color:#fff; }

.footer-bottom {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.88rem;
    border-top: 1px solid var(--border);
    padding-top: 30px;
}

/* --- MODULE CONFIG PAGE STYLES --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 24px 80px;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.top-bar h1 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar h1 i { color: var(--accent); }

.back-btn {
    background: rgba(255,255,255,0.06);
    color: var(--text-white);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.3s, border-color 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 30px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.card:hover { border-color: rgba(255,255,255,0.12); }

.card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h2 i { font-size: 1rem; }

.card label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-gray);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.card p.hint {
    font-size: 0.82rem;
    color: var(--text-gray);
    margin-bottom: 14px;
    margin-top: -6px;
}

.card input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    margin-top: 14px;
    color: var(--text-gray);
    font-size: 0.85rem;
    font-weight: 600;
}

.card input[type="number"],
.card input[type="text"],
.card input[type="email"],
.card textarea,
.card select {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-white);
    padding: 10px 14px;
    font-size: 0.88rem;
    margin-top: 6px;
    margin-bottom: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.card input[type="number"]:focus,
.card input[type="text"]:focus,
.card textarea:focus,
.card select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.card select option { background: #111; color: var(--text-white); }

.card textarea { resize: vertical; min-height: 80px; }

.settings {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 2px solid var(--border);
}

/* Row layout for inputs */
.field-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.field-row > * { flex: 1; min-width: 120px; }

/* List items for whitelist/blacklist */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.list-item span { color: var(--text-light); }

.btn-remove {
    background: rgba(255, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 68, 68, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-remove:hover { background: var(--danger); color: white; }

.btn-add {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-add:hover { background: var(--accent); color: #000; }

/* --- SAVE BUTTON --- */
.save-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 14px 36px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.save-btn:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 0 25px var(--accent-glow);
}

.save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.save-btn.saving {
    background: var(--accent-dark);
}

.save-btn.saved {
    background: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.save-btn.error {
    background: var(--danger);
}

/* --- DEV ACTION BUTTONS --- */
.action-btn {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-btn:hover { border-color: var(--accent); color: var(--accent); }
.action-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.action-btn.success:hover { border-color: var(--success); color: var(--success); }

.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-row input,
.input-row select {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-white);
    padding: 10px 14px;
    font-size: 0.88rem;
    flex: 1;
    transition: border-color 0.2s;
}

.input-row input:focus,
.input-row select:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- DANGER ZONE --- */
.danger-zone {
    border-color: rgba(255, 68, 68, 0.3) !important;
}

.danger-zone h2 {
    color: var(--danger) !important;
}

/* --- ANIMATIONS --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); text-shadow: 0 0 0 var(--accent-glow); }
    50% { transform: scale(1.08); text-shadow: 0 0 20px var(--accent); }
    100% { transform: scale(1); text-shadow: 0 0 0 var(--accent-glow); }
}

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

.fa-spin { animation: spin 1s linear infinite; }

/* --- MOBILE: 768px --- */
@media (max-width: 768px) {

    .menu-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
        transition: all 0.4s ease;
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        color: var(--text-white);
    }

    body.menu-open { overflow: hidden; }

    .hero { height: auto; padding: 120px 6% 80px; }
    .hero h1 { font-size: 2.4rem; letter-spacing: -1px; }

    .btn-primary, .btn-secondary, .btn-dev {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: 12px 22px;
    }

    .metrics-bar {
        flex-direction: column;
        gap: 30px;
        padding: 50px 8%;
        align-items: flex-start;
    }

    .features { padding: 60px 6%; }
    .section-title { font-size: 1.7rem; margin-bottom: 36px; }
    .feature-grid { grid-template-columns: 1fr; gap: 16px; }
    .feature-card { padding: 28px 22px; }

    .dev-info { padding: 60px 6%; }
    .dev-container { flex-direction: column; padding: 30px 20px; gap: 30px; }

    .main-footer { padding: 50px 6% 30px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 40px; }

    .container { padding: 90px 16px 40px; }
    .top-bar { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 24px; }
    .top-bar h1 { font-size: 1.35rem; }
    .card { padding: 20px 16px; }

    .dev-two-col { grid-template-columns: 1fr; }
    .dev-grid { grid-template-columns: 1fr 1fr; }

    #toast-container { right: 12px; left: 12px; }
    .toast { min-width: unset; width: 100%; }
}

/* --- MOBILE: 480px --- */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.9rem; }
    .section-title { font-size: 1.4rem; }
    .navbar { padding: 1rem 5%; }
    .logo { font-size: 1.2rem; }
    .metrics-bar { padding: 40px 6%; }
    .metric i { font-size: 1.8rem; }
    .metric-data .value { font-size: 1.4rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 22px 16px; }
    .save-btn { font-size: 0.9rem; padding: 12px 20px; }
    .dev-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SEARCHABLE SELECT COMPONENT
   ============================================ */

.ss-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 14px;
    color: var(--text);
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s;
}
.ss-display:hover, .ss-display.ss-active {
    border-color: var(--accent);
}
.ss-placeholder { color: var(--text-gray); }
.ss-selected-text { color: var(--text); }
.ss-arrow { color: var(--text-gray); font-size: 0.75rem; transition: transform 0.2s; }
.ss-display.ss-active .ss-arrow { transform: rotate(180deg); }

.ss-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 8px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    max-height: 260px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.ss-dropdown.ss-open { display: flex; }

.ss-search {
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    padding: 9px 14px;
    font-size: 0.85rem;
    outline: none;
    width: 100%;
}
.ss-search::placeholder { color: var(--text-gray); }

.ss-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    flex: 1;
}
.ss-list::-webkit-scrollbar { width: 4px; }
.ss-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.ss-option {
    padding: 9px 14px;
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    cursor: pointer;
    transition: background 0.15s;
}
.ss-option:hover { background: rgba(0, 212, 255, 0.08); color: var(--text); }
.ss-option.ss-selected { color: var(--accent); background: rgba(0, 212, 255, 0.06); }
.ss-no-results { padding: 12px 14px; color: var(--text-gray); font-size: 0.85rem; }

/* --surface / --border compat (used by public pages) */
:root {
    --surface: var(--card-bg, #0d0d0d);
    --border: #1e1e1e;
    --text: #e8e8e8;
    --text-muted: #888;
}

/* ============================================
   PUBLIC PAGE SPECIFIC STYLES (guide, blog, privacy, terms)
   ============================================ */

/* Navbar additions for public pages */
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo   { font-size: 1.4rem; }
.nav-title  { color: var(--text-white, #e8e8e8); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.nav-link   { color: var(--text-gray, #888); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; padding: 4px 8px; border-radius: 6px; }
.nav-link:hover, .nav-link.active { color: var(--accent, #00d4ff); }

/* Footer for public pages */
.footer {
    background: var(--card-bg, #0d0d0d);
    border-top: 1px solid var(--border, #1e1e1e);
    padding: 48px 5% 24px;
    margin-top: 60px;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    max-width: 960px;
    margin: 0 auto 32px;
}
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-logo  { font-size: 1.6rem; }
.footer-title { font-size: 1.1rem; font-weight: 700; color: var(--text-white, #e8e8e8); }
.footer-tagline { color: var(--text-gray, #888); font-size: 0.85rem; margin: 0; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { color: var(--text-white, #e8e8e8); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 4px; }
.footer-col a  { color: var(--text-gray, #888); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent, #00d4ff); }
.footer-bottom {
    text-align: center;
    color: var(--text-gray, #888);
    font-size: 0.8rem;
    border-top: 1px solid var(--border, #1e1e1e);
    padding-top: 20px;
    max-width: 960px;
    margin: 0 auto;
}
@media (max-width: 640px) {
    .footer-content { grid-template-columns: 1fr; }
    .footer-links { gap: 24px; }
}

/* ── Blog floating widget ────────────────────────────────────────────────── */
.blog-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: linear-gradient(135deg, #0d0d0d 0%, #111 100%);
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 50px;
    color: #e8e8e8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 212, 255, 0.08);
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}
.blog-widget i {
    color: var(--accent, #00d4ff);
    font-size: 0.95rem;
}
.blog-widget span {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease;
}
.blog-widget:hover {
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.18), 0 0 0 1px rgba(0, 212, 255, 0.2);
    color: var(--accent, #00d4ff);
    transform: translateY(-2px);
}
.blog-widget:hover span {
    max-width: 60px;
}
@media (max-width: 480px) {
    .blog-widget { bottom: 16px; right: 16px; padding: 10px 14px; }
    .blog-widget span { display: none; }
}

/* ─── PREMIUM FEATURE SYSTEM ─────────────────────────────────── */

/* Gold hover glow on any element marked as a premium feature */
[data-premium] {
    position: relative;
    transition: box-shadow 0.25s, border-color 0.25s;
}
[data-premium]:hover {
    box-shadow: 0 0 0 2px rgba(255, 200, 0, 0.35), 0 4px 24px rgba(255, 200, 0, 0.1);
    border-radius: 12px;
}

/* Locked state: semi-transparent with gold lock overlay */
[data-premium].premium-locked {
    opacity: 0.75;
    pointer-events: none;
    cursor: not-allowed;
    position: relative;
}
[data-premium].premium-locked::after {
    content: "⭐ Premium";
    position: absolute;
    top: 10px;
    right: 12px;
    background: linear-gradient(90deg, #FFB800, #FF7A00);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 5;
}

/* Clickable locked area — pointer-events restored for click through to modal */
.premium-locked-clickable {
    position: relative;
    cursor: pointer;
}
.premium-locked-clickable::after {
    content: "⭐ Premium";
    position: absolute;
    top: 10px;
    right: 12px;
    background: linear-gradient(90deg, #FFB800, #FF7A00);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    z-index: 5;
}
.premium-locked-clickable:hover {
    box-shadow: 0 0 0 2px rgba(255, 184, 0, 0.45), 0 4px 24px rgba(255, 184, 0, 0.12);
    border-radius: 12px;
}

/* Inline premium badge */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(90deg, #FFB800, #FF7A00);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.4px;
}

/* Premium section card gold border */
.premium-section-card {
    border: 1px solid rgba(255, 184, 0, 0.25) !important;
    background: linear-gradient(160deg, rgba(255,184,0,0.03) 0%, transparent 60%) !important;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.premium-section-card:hover {
    border-color: rgba(255, 184, 0, 0.5) !important;
    box-shadow: 0 0 24px rgba(255, 184, 0, 0.08) !important;
}

/* Premium Upgrade Modal */
.axon-prem-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.axon-prem-modal {
    background: #0d1526;
    border: 1px solid rgba(255,184,0,0.4);
    border-radius: 18px;
    padding: 40px 36px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6), 0 0 40px rgba(255,184,0,0.08);
}
.axon-prem-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    color: #718096; font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
}
.axon-prem-close:hover { color: #e2e8f0; }
.axon-prem-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #FFB800, #FF7A00);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 18px;
    box-shadow: 0 8px 24px rgba(255,184,0,0.3);
}
.axon-prem-modal h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.axon-prem-modal p {
    color: #e2e8f0;
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.6;
}
.axon-prem-sub {
    color: #a0aec0 !important;
    font-size: 0.85rem !important;
    margin-bottom: 24px !important;
}
.axon-prem-plans {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    justify-content: center;
}
.axon-prem-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(90deg, #FFB800, #FF7A00);
    color: #000;
    transition: opacity 0.2s, transform 0.1s;
}
.axon-prem-btn:hover { opacity: 0.88; }
.axon-prem-btn:active { transform: scale(0.97); }
.axon-prem-btn-yr {
    background: linear-gradient(90deg, #00D4FF, #7B2FFF);
    color: #fff;
}
.axon-save {
    background: rgba(0,0,0,0.25);
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.7rem;
}
.axon-prem-more {
    display: inline-block;
    color: #a0aec0;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.axon-prem-more:hover { color: #00D4FF; }

/* Automod module premium indicator */
.module-card.premium-feature-card .module-header {
    border-left: 3px solid rgba(255,184,0,0.6);
    padding-left: 10px;
    margin-left: -10px;
}
