/* ============================================================
   ATOMICATOR – Main Stylesheet
   TRUE BLACK + RED ACCENT THEME
   ============================================================ */

/* --- Reset & Variables --- */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #1a1a1a;
    --bg-input: #0d0d0d;
    --text-primary: #f5f5f5;
    --text-secondary: #999999;
    --text-muted: #555555;
    --accent: #e63946;
    --accent-light: #ff4757;
    --accent-dark: #b71c1c;
    --accent-glow: rgba(230, 57, 70, 0.25);
    --purple: #ff6b35;
    --pink: #ff1744;
    --green: #00e676;
    --red: #ff1744;
    --orange: #ff9100;
    --blue: #29b6f6;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 50px rgba(0, 0, 0, 0.6);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --impersonation-height: 40px;
}

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

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Container --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 560px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.navbar.scrolled {
    padding: 10px 0;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.navbar .container {
    display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 800; color: var(--text-primary);
    letter-spacing: -0.5px;
}
.navbar-brand i {
    font-size: 26px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-links { display: flex; gap: 32px; }
.navbar-links a {
    color: var(--text-secondary); font-weight: 500; font-size: 15px;
    position: relative;
}
.navbar-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    transition: width 0.3s;
}
.navbar-links a:hover { color: var(--text-primary); }
.navbar-links a:hover::after { width: 100%; }
.navbar-actions { display: flex; gap: 12px; align-items: center; }
.navbar-toggle {
    display: none; background: none; border: none; color: var(--text-primary);
    font-size: 22px; padding: 6px 8px; min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center; border-radius: var(--radius-sm);
}
.navbar-toggle.active { color: var(--accent); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm); font-weight: 600;
    font-size: 14px; border: none; transition: var(--transition);
    white-space: nowrap; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px); color: #fff;
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}
.btn-secondary {
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--border-hover); }
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); background: rgba(230, 57, 70, 0.1); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #d50000; transform: translateY(-2px); color: #fff; }
.btn-success { background: linear-gradient(135deg, var(--green), #00c853); color: #000; font-weight: 700; }
.btn-success:hover { transform: translateY(-2px); color: #000; box-shadow: 0 6px 20px rgba(0, 230, 118, 0.3); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-google {
    background: #fff; color: #333; border: 1px solid #ddd;
}
.btn-google:hover { background: #f5f5f5; color: #333; }
.btn-github {
    background: #24292e; color: #fff; border: 1px solid #444;
}
.btn-github:hover { background: #333; color: #fff; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    padding: 120px 0 80px; overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
}
.hero-bg::before {
    content: '';
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(230, 57, 70, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 80%, rgba(255, 23, 68, 0.06) 0%, transparent 40%);
    animation: heroGlow 15s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, -3%) rotate(5deg); }
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(230, 57, 70, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 57, 70, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black, transparent);
}
.hero .container { position: relative; z-index: 1; text-align: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px; border-radius: 50px;
    background: rgba(230, 57, 70, 0.1); border: 1px solid rgba(230, 57, 70, 0.2);
    color: var(--accent-light); font-size: 14px; font-weight: 500;
    margin-bottom: 24px;
}
.hero-badge .pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}
.hero h1 {
    font-size: clamp(40px, 6vw, 72px); font-weight: 900;
    line-height: 1.1; margin-bottom: 24px;
    letter-spacing: -2px;
}
.hero h1 .gradient,
.gradient-text {
    background: linear-gradient(135deg, var(--accent-light), var(--purple), var(--pink));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 20px; color: var(--text-secondary);
    max-width: 640px; margin: 0 auto 40px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 48px; justify-content: center;
    margin-top: 64px; padding-top: 40px;
    border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat .number {
    font-size: 36px; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-light), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-stat .label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* Hero section gradient text override */
.hero-section h1 span {
    background: linear-gradient(135deg, var(--accent-light), var(--purple), var(--pink));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating elements */
.hero-float {
    position: absolute; border-radius: var(--radius);
    background: var(--bg-card); border: 1px solid var(--border);
    padding: 16px 20px; box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}
.hero-float-1 { top: 25%; left: 5%; animation-delay: 0s; }
.hero-float-2 { top: 35%; right: 5%; animation-delay: 2s; }
.hero-float-3 { bottom: 20%; left: 10%; animation-delay: 4s; }
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}
.hero-float i { font-size: 24px; color: var(--accent-light); margin-right: 10px; }
.hero-float span { font-weight: 600; font-size: 14px; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 100px 0; position: relative; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .overline {
    display: inline-block; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    color: var(--accent-light); margin-bottom: 12px;
}
.section-header h2 {
    font-size: clamp(32px, 4vw, 48px); font-weight: 800;
    margin-bottom: 16px; letter-spacing: -1px;
}
.section-header p { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* --- Features --- */
.features-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 36px;
    transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover {
    transform: translateY(-4px); border-color: rgba(230, 57, 70, 0.2);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.06), rgba(255, 107, 53, 0.03));
    box-shadow: 0 8px 32px rgba(230, 57, 70, 0.1);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 56px; height: 56px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(255, 107, 53, 0.12));
    color: var(--accent-light);
}
.feature-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }

/* --- How it works --- */
.steps-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
    position: relative;
}
.steps-grid::before {
    content: ''; position: absolute; top: 40px; left: 15%; right: 15%;
    height: 2px; background: linear-gradient(90deg, var(--accent), var(--purple), var(--pink));
    opacity: 0.3;
}
.step-card { text-align: center; position: relative; z-index: 1; }
.step-number {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 800; margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: 14px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 32px;
    transition: var(--transition), box-shadow 0.4s ease;
    box-sizing: border-box; max-width: 100%; overflow: hidden;
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 30px rgba(230, 57, 70, 0.05);
}
.card-header { margin-bottom: 24px; }
.card-header h3 { font-size: 22px; font-weight: 700; }
.card-header p { color: var(--text-secondary); margin-top: 4px; font-size: 14px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-size: 14px; font-weight: 600;
    margin-bottom: 6px; color: var(--text-secondary);
}
.form-control {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 15px; transition: var(--transition); outline: none;
    min-height: 44px; box-sizing: border-box; max-width: 100%;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15), 0 0 20px rgba(230, 57, 70, 0.08);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}
select.form-control::-ms-expand { display: none; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-help code {
    background: rgba(230, 57, 70, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-light);
    font-size: 11px;
}
.form-error { font-size: 13px; color: var(--red); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Toggle switch (single clean version) */
.toggle-switch {
    position: relative; display: inline-block;
    width: 48px; height: 26px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: var(--transition);
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 20px; height: 20px;
    left: 3px; bottom: 3px;
    background: white; border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.3);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 120px 20px 40px; position: relative;
}
.auth-page .hero-bg { position: fixed; }
.auth-card {
    background: var(--bg-card); border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: var(--radius-xl); padding: 48px;
    width: 100%; max-width: 460px; position: relative; z-index: 1;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: -1px; left: 20%; right: 20%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--purple), transparent);
    border-radius: 2px;
}
.auth-logo {
    text-align: center; margin-bottom: 32px;
}
.auth-logo a {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 24px; font-weight: 800; color: var(--text-primary);
}
.auth-logo i {
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-title { text-align: center; margin-bottom: 8px; font-size: 26px; font-weight: 800; }
.auth-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 32px; font-size: 15px; }

.auth-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 24px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.social-buttons { display: flex; gap: 12px; margin-bottom: 4px; }
.social-buttons .btn { flex: 1; }

.verification-inputs {
    display: flex; gap: 10px; justify-content: center; margin: 24px 0;
}
.verification-inputs input {
    width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
    background: var(--bg-input); border: 2px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    outline: none; transition: var(--transition);
}
.verification-inputs input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-body {
    display: flex; min-height: 100vh;
}
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width); background: #0a0a0a;
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; z-index: 100;
    transition: var(--transition);
}
.sidebar.collapsed { width: 72px; }
.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .credits-badge span { display: none; }
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px; border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 800; color: var(--text-primary);
}
.logo-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; font-size: 18px;
}
.sidebar-toggle {
    background: none; border: none; color: var(--text-muted);
    font-size: 18px; padding: 4px;
}
.sidebar-toggle:hover { color: var(--text-primary); }
.sidebar-nav {
    flex: 1; padding: 16px 12px; overflow-y: auto;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-weight: 500; font-size: 14px;
    margin-bottom: 4px; transition: var(--transition);
    min-height: 44px;
}
.nav-item:hover { background: rgba(230, 57, 70, 0.08); color: var(--text-primary); }
.nav-item.active {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(255, 107, 53, 0.08));
    color: var(--accent-light);
}
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-divider { height: 1px; background: var(--border); margin: 12px 0; }
.nav-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-muted);
    padding: 8px 14px 4px;
}
.sidebar-footer {
    padding: 16px; border-top: 1px solid var(--border);
}
.credits-badge {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(255, 107, 53, 0.08));
    color: var(--accent-light); font-weight: 600; font-size: 14px;
}

.dashboard-main {
    flex: 1; margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
    max-width: 100%;
}
.sidebar.collapsed ~ .dashboard-main { margin-left: 72px; }

/* Topbar */
.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 20px;
    padding: 0 24px; height: var(--topbar-height);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 20px; }
.topbar-search {
    flex: 1; position: relative; max-width: 400px;
}
.topbar-search i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 14px;
}
.topbar-search input {
    width: 100%; padding: 10px 16px 10px 40px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 14px; outline: none; transition: var(--transition);
}
.topbar-search input:focus { border-color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }

/* Impersonation bar (admin "login as" mode) */
#impersonation-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    padding: 8px 20px;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: center;
    gap: 6px 12px;
    font-size: 14px; font-weight: 600;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.impersonation-text {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 6px; min-width: 0; overflow-wrap: anywhere;
}
.impersonation-btn {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    background: #000; color: #f59e0b !important;
    padding: 4px 14px; border-radius: 6px;
    text-decoration: none; font-size: 13px; font-weight: 600;
    white-space: nowrap;
}
.impersonation-btn:hover { opacity: 0.85; }

#impersonation-bar ~ .sidebar,
#impersonation-bar ~ .dashboard-main,
#impersonation-bar ~ .navbar {
    margin-top: var(--impersonation-height);
}

/* Notification bell */
.notification-bell {
    position: relative; cursor: pointer; padding: 8px;
}
.notification-bell i { font-size: 20px; color: var(--text-secondary); transition: var(--transition); }
.notification-bell:hover i { color: var(--text-primary); }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 50%; background: #ff1744;
    color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    animation: badgePop 0.3s ease, pulse-glow 2s infinite;
    border: 2px solid #000;
}
@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.notification-dropdown {
    position: absolute; top: 100%; right: -10px;
    width: 360px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: none;
    overflow: hidden;
}
.notification-dropdown.show { display: block; animation: slideDown 0.2s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border);
}
.notif-header h4 { font-size: 16px; font-weight: 700; }
.notif-clear { background: none; border: none; color: var(--accent-light); font-size: 13px; cursor: pointer; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid var(--border); transition: var(--transition);
}
.notif-item:hover { background: rgba(230, 57, 70, 0.04); }
.notif-item.unread { background: rgba(230, 57, 70, 0.06); }
.notif-item.unread .notif-icon { background: var(--red); }
.notif-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 14px;
    background: rgba(230, 57, 70, 0.12); color: var(--accent-light);
}
.notif-icon.success { background: rgba(0, 230, 118, 0.12); color: var(--green); }
.notif-icon.error { background: rgba(255, 23, 68, 0.12); color: var(--red); }
.notif-icon.warning { background: rgba(255, 145, 0, 0.12); color: var(--orange); }
.notif-content { flex: 1; }
.notif-content p { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.notif-content .notif-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* User menu */
.user-menu { position: relative; cursor: pointer; }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; font-weight: 700; font-size: 14px;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 8px;
    width: 220px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: none;
    overflow: hidden;
}
.user-dropdown.show { display: block; animation: slideDown 0.2s ease; }
.user-info { padding: 16px; }
.user-info strong { display: block; font-size: 14px; }
.user-info span { font-size: 13px; color: var(--text-muted); }
.dropdown-divider { height: 1px; background: var(--border); }
.user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; color: var(--text-secondary); font-size: 14px;
}
.user-dropdown a:hover { background: rgba(230, 57, 70, 0.06); color: var(--text-primary); }
.logout-link { color: var(--red); }

/* ============================================================
   DASHBOARD CONTENT
   ============================================================ */
.page-content { padding: 32px 24px; overflow-x: hidden; box-sizing: border-box; }
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}
.page-header h1 { font-size: 28px; font-weight: 800; }
.page-header p { color: var(--text-secondary); font-size: 15px; margin-top: 4px; }

/* Stats grid */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px; margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
}
.stat-card:hover {
    border-color: var(--accent-glow);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.08);
}
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 16px;
}
.stat-card .stat-icon.purple { background: rgba(255, 107, 53, 0.12); color: var(--purple); }
.stat-card .stat-icon.blue { background: rgba(41, 182, 246, 0.12); color: var(--blue); }
.stat-card .stat-icon.green { background: rgba(0, 230, 118, 0.12); color: var(--green); }
.stat-card .stat-icon.orange { background: rgba(255, 145, 0, 0.12); color: var(--orange); }
.stat-value { font-size: 32px; font-weight: 800; margin-bottom: 4px; }
.stat-label { font-size: 14px; color: var(--text-secondary); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.form-actions {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px;
}
table {
    width: 100%; border-collapse: collapse;
}
table th, table td {
    padding: 14px 16px; text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
table th {
    font-weight: 600; color: var(--text-secondary);
    font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
    background: var(--bg-input);
}
table td { color: var(--text-primary); }
table tbody tr { transition: var(--transition); }
table tbody tr:hover { background: rgba(230, 57, 70, 0.03); }

/* Status badges */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 50px;
    font-size: 12px; font-weight: 600;
}
.badge-processing { background: rgba(41, 182, 246, 0.12); color: var(--blue); }
.badge-completed { background: rgba(0, 230, 118, 0.12); color: var(--green); }
.badge-error { background: rgba(255, 23, 68, 0.12); color: var(--red); }
.badge-pending { background: rgba(255, 145, 0, 0.12); color: var(--orange); }
.badge-expired { background: rgba(85, 85, 85, 0.15); color: var(--text-muted); }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 40px;
    text-align: center; transition: var(--transition);
    position: relative;
}
.pricing-card.featured {
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)), linear-gradient(135deg, var(--accent), var(--purple), var(--pink));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 40px var(--accent-glow);
}
.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    padding: 6px 20px; border-radius: 50px;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.pricing-card .price {
    font-size: 48px; font-weight: 900; margin: 20px 0;
}
.pricing-card .price span { font-size: 18px; color: var(--text-secondary); font-weight: 500; }
.pricing-card .price .currency { font-size: 24px; vertical-align: top; }
.pricing-features { list-style: none; margin: 24px 0 32px; text-align: left; }
.pricing-features li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; color: var(--text-secondary); font-size: 15px;
}
.pricing-features li i { color: var(--green); font-size: 16px; }
.pricing-features li.disabled { opacity: 0.4; }
.pricing-features li.disabled i { color: var(--text-muted); }

/* ============================================================
   VIDEO CARDS
   ============================================================ */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.video-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: var(--transition);
}
.video-card:hover { border-color: var(--accent-glow); transform: translateY(-2px); }
.video-thumb {
    position: relative; padding-top: 56.25%;
    background: var(--bg-input);
}
.video-thumb .thumb-icon {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px; color: var(--text-muted);
}
.video-thumb .video-status {
    position: absolute; top: 12px; right: 12px;
}
.video-thumb .video-timer {
    position: absolute; bottom: 12px; left: 12px;
    padding: 4px 10px; border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.7); color: var(--orange);
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
.video-info { padding: 16px; }
.video-info h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.video-meta {
    display: flex; align-items: center; gap: 12px;
    color: var(--text-muted); font-size: 13px;
}
.video-actions {
    display: flex; gap: 8px; padding: 12px 16px;
    border-top: 1px solid var(--border);
}
.video-actions .btn { flex: 1; font-size: 13px; padding: 8px 12px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; border-radius: var(--radius-sm);
    margin: 16px 24px; font-size: 14px;
    animation: slideDown 0.3s ease;
}
.alert-success { background: rgba(0, 230, 118, 0.08); border: 1px solid rgba(0, 230, 118, 0.15); color: var(--green); }
.alert-error { background: rgba(255, 23, 68, 0.08); border: 1px solid rgba(255, 23, 68, 0.15); color: var(--red); }
.alert-info { background: rgba(41, 182, 246, 0.08); border: 1px solid rgba(41, 182, 246, 0.15); color: var(--blue); }
.alert-warning { background: rgba(255, 145, 0, 0.08); border: 1px solid rgba(255, 145, 0, 0.15); color: var(--orange); }
.alert-close {
    margin-left: auto; background: none; border: none;
    color: inherit; font-size: 20px; cursor: pointer; opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 32px;
}
.pagination a, .pagination span {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; transition: var(--transition);
}
.pagination a {
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-secondary);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent-light); }
.pagination .active {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    color: #fff; border: none;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-xl); width: 100%; max-width: 520px;
    padding: 32px; animation: modalIn 0.3s ease;
    max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px;
}
.modal-header h3 { font-size: 20px; font-weight: 700; }
.modal-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 24px; cursor: pointer; padding: 4px 8px;
    border-radius: var(--radius-sm); transition: var(--transition);
}
.modal-close:hover { color: var(--red); background: rgba(255, 23, 68, 0.1); }

/* ============================================================
   LOADING / SPINNER
   ============================================================ */
.spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }

.loading-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px;
}
.loading-overlay p { color: var(--text-secondary); font-size: 16px; }

/* ============================================================
   BILLING / AMOUNT SELECTOR
   ============================================================ */
.amount-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-bottom: 20px;
}
.amount-option {
    padding: 16px; border-radius: var(--radius-sm);
    background: var(--bg-input); border: 2px solid var(--border);
    text-align: center; cursor: pointer; transition: var(--transition);
}
.amount-option:hover { border-color: var(--accent-glow); }
.amount-option.selected { border-color: var(--accent); background: rgba(230, 57, 70, 0.08); }
.amount-option .amount { font-size: 24px; font-weight: 800; }
.amount-option .credits-info { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ============================================================
   TIMER
   ============================================================ */
.countdown-timer {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: var(--radius-sm);
    background: rgba(255, 23, 68, 0.1); color: var(--red);
    font-size: 12px; font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.countdown-timer.warning { background: rgba(255, 145, 0, 0.1); color: var(--orange); }
.countdown-timer.safe { background: rgba(0, 230, 118, 0.1); color: var(--green); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
    display: flex; gap: 0; border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 24px; border: none; background: none;
    color: var(--text-muted); font-weight: 600; font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: var(--transition); cursor: pointer;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    color: var(--accent-light);
    border-bottom-color: var(--accent);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.8), #000000);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
    margin-bottom: 48px;
}
.footer-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 22px; font-weight: 800; color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-logo i {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.footer-brand p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; }
.footer-links h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-links a {
    display: block; color: var(--text-secondary); font-size: 14px;
    padding: 6px 0; transition: var(--transition);
}
.footer-links a:hover { color: var(--accent-light); }
.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 24px;
    text-align: center; color: var(--text-muted); font-size: 14px;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-light); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.hidden { display: none; }
.w-full { width: 100%; }

/* ============================================================
   Slide Panel (Keywords manager, etc.)
   ============================================================ */
.slide-panel {
    position: fixed;
    top: 0; right: -420px;
    width: 400px; height: 100vh;
    background: #0a0a0a;
    border-left: 1px solid rgba(230, 57, 70, 0.1);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}
.slide-panel.show { right: 0; }
.slide-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1;
}
.slide-panel-header h3 { font-size: 18px; font-weight: 700; }
.slide-panel-body { padding: 24px; }

/* --- Keywords Grid --- */
.keywords-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.keyword-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(255, 107, 53, 0.06));
    border: 1px solid rgba(230, 57, 70, 0.12);
    padding: 6px 12px; border-radius: 20px;
    font-size: 13px; transition: var(--transition);
    animation: fadeIn 0.3s ease;
}
.keyword-tag:hover { border-color: rgba(230, 57, 70, 0.25); background: rgba(230, 57, 70, 0.12); }
.keyword-text { color: var(--text-primary); }
.keyword-lang {
    font-size: 10px; padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 107, 53, 0.15);
    color: var(--purple); font-weight: 600;
}
.keyword-delete {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 16px; padding: 0 2px;
    line-height: 1; transition: var(--transition);
}
.keyword-delete:hover { color: var(--red); }
.keywords-preview {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.keyword-mini {
    display: inline-block; padding: 3px 10px;
    font-size: 12px;
    background: rgba(230, 57, 70, 0.06);
    border: 1px solid rgba(230, 57, 70, 0.1);
    border-radius: 12px; color: var(--accent-light);
}

/* ============================================================
   Mini Tabs (for queue source switching)
   ============================================================ */
.mini-tabs {
    display: flex; gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px; border-radius: var(--radius-sm);
}
.mini-tab {
    flex: 1; padding: 8px 12px;
    font-size: 13px; font-weight: 500;
    border: none; background: none;
    color: var(--text-muted); cursor: pointer;
    border-radius: 6px; transition: var(--transition);
    min-height: 44px; display: flex; align-items: center; justify-content: center;
}
.mini-tab:hover { color: var(--text-secondary); background: rgba(255, 255, 255, 0.04); }
.mini-tab.active {
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(255, 107, 53, 0.08));
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.1);
}
.queue-tab { display: none; }
.queue-tab.active { display: block; animation: fadeIn 0.3s ease; }
.method-tab { display: none; }
.method-tab.active { display: block; animation: fadeIn 0.3s ease; }

/* ============================================================
   Payment Method Cards & Saved Methods
   ============================================================ */
.payment-method-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
}
.payment-method-card:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}
.payment-method-card.selected {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.06);
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.1);
}

.saved-method {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.saved-method:hover { background: rgba(255, 255, 255, 0.02); }
.saved-method.default { background: rgba(230, 57, 70, 0.04); }
.saved-method:last-child { border-bottom: none; }

.transaction-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.transaction-item:last-child { border-bottom: none; }

/* ============================================================
   Popup Panel (inline popup within a card)
   ============================================================ */
.popup-panel {
    display: none; padding: 16px;
    border-top: 1px solid var(--border);
    animation: slideDown 0.3s ease;
}
.popup-panel.show { display: block; }
.popup-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.popup-header h4 { font-size: 15px; font-weight: 600; }

/* ============================================================
   Range slider
   ============================================================ */
.form-range {
    -webkit-appearance: none;
    width: 100%; height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    outline: none; margin: 8px 0;
}
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    cursor: pointer;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
}
.form-range::-moz-range-thumb {
    width: 18px; height: 18px;
    border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--accent), var(--purple));
    cursor: pointer;
    box-shadow: 0 0 10px rgba(230, 57, 70, 0.4);
}

/* ============================================================
   CONTENT LAYOUTS (dashboard pages)
   ============================================================ */
.content-settings-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.billing-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(230, 57, 70, 0.2); }
    50% { box-shadow: 0 0 20px rgba(230, 57, 70, 0.4); }
}

/* ============================================================
   LOGIN TOAST (bottom-right, green, animated)
   ============================================================ */
.login-toast {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 99999;
    display: flex; align-items: center; gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #000;
    border-radius: 12px;
    font-weight: 600; font-size: 14px;
    box-shadow: 0 8px 32px rgba(0, 200, 83, 0.3);
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1), toastFadeOut 0.5s ease 4s forwards;
    pointer-events: auto;
}
.login-toast i { font-size: 20px; }
@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(20px); }
}

/* ============================================================
   KEYWORDS POPUP (slide down from top)
   ============================================================ */
.keywords-popup-overlay {
    position: fixed; inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none; opacity: 0;
    transition: opacity 0.3s ease;
}
.keywords-popup-overlay.show { display: block; opacity: 1; }

.keywords-popup {
    position: fixed;
    top: -100%; left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 95%; max-width: 560px;
    background: #111111;
    border: 1px solid rgba(230, 57, 70, 0.15);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh; overflow-y: auto;
}
.keywords-popup.show { top: 0; }
.keywords-popup-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #0a0a0a;
}
.keywords-popup-header h3 {
    font-size: 18px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.keywords-popup-header h3 i { color: #e63946; }
.keywords-popup-body { padding: 24px; }
.keywords-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #0a0a0a;
    display: flex; justify-content: flex-end; gap: 12px;
}

/* Keywords input area with tags */
.keywords-input-area {
    min-height: 120px; padding: 12px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex; flex-wrap: wrap; gap: 8px;
    align-content: flex-start;
    cursor: text;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.keywords-input-area:focus-within {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}
.keywords-input-area input {
    flex: 1; min-width: 120px;
    border: none; background: transparent;
    color: #f5f5f5; font-size: 14px;
    outline: none; padding: 6px 4px;
}
.keywords-input-area input::placeholder { color: #555; }

.keyword-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: rgba(230, 57, 70, 0.12);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 20px;
    font-size: 13px; color: #ff4757;
    animation: chipIn 0.2s ease;
}
@keyframes chipIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.keyword-chip .chip-remove {
    background: none; border: none;
    color: #ff4757; cursor: pointer;
    font-size: 14px; padding: 0;
    line-height: 1; opacity: 0.6;
    transition: opacity 0.2s;
}
.keyword-chip .chip-remove:hover { opacity: 1; }

/* Existing keywords list in popup */
.existing-keywords {
    margin-top: 16px; max-height: 200px; overflow-y: auto;
}
.existing-keyword-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}
.existing-keyword-item:hover { background: rgba(255, 255, 255, 0.02); }
.existing-keyword-item:last-child { border-bottom: none; }

/* ============================================================
   VIDEO READY NOTIFICATION BADGE (red count)
   ============================================================ */
.video-ready-badge {
    position: absolute; top: -2px; right: -2px;
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px;
    background: #ff1744; color: #fff;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    animation: badgePulse 2s infinite;
    border: 2px solid #000;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 23, 68, 0); }
}

/* ============================================================
   RESPONSIVE — 1024px
   ============================================================ */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    .content-settings-grid { grid-template-columns: 1fr; }
    .billing-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — 768px (Tablet)
   ============================================================ */
@media (max-width: 768px) {
    .navbar .container { flex-wrap: wrap; }
    .navbar-brand { order: 1; }
    .navbar-toggle { display: flex; order: 2; }
    .navbar-links {
        display: none; width: 100%; order: 3;
        flex-direction: column; gap: 2px;
        margin-top: 16px; padding-top: 16px;
        border-top: 1px solid var(--border);
    }
    .navbar-links.show { display: flex; }
    .navbar-links a { padding: 12px 4px; display: block; }
    .navbar-links a::after { display: none; }
    .navbar-actions {
        display: none; width: 100%; order: 4;
        flex-direction: column; gap: 10px;
        margin-top: 12px;
    }
    .navbar-actions.show { display: flex; }
    .navbar-actions .btn { width: 100%; justify-content: center; }
    .hero h1 { font-size: 36px; letter-spacing: -1px; }
    .hero p { font-size: 16px; }
    .hero-stats { flex-direction: column; gap: 24px; }
    .hero-float { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
    .form-row { grid-template-columns: 1fr; }
    .grid-2col { grid-template-columns: 1fr; gap: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .video-grid { grid-template-columns: 1fr; }
    .auth-page { padding: 100px 16px 24px; }
    .auth-card { padding: 32px 24px; }
    .section { padding: 64px 0; }
    .section-header { margin-bottom: 40px; }

    /* Dashboard mobile */
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.open { transform: translateX(0); }
    .dashboard-main { margin-left: 0; }
    .mobile-toggle { display: block; }
    .topbar-search { max-width: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 20px 16px; }
    .amount-grid { grid-template-columns: repeat(2, 1fr); }
    .content-settings-grid { grid-template-columns: 1fr; }
    .billing-grid { grid-template-columns: 1fr; }
    .automation-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-header .credits-badge { align-self: flex-start; }

    /* Payment method cards responsive */
    .payment-method-card { padding: 16px 12px; }

    /* Popup panels full-width */
    .popup-panel { position: static; max-height: none; }

    /* Table overflow on mobile */
    .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-wrapper table { min-width: 500px; }

    /* Form action buttons stack full-width on mobile */
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }

    /* Notification dropdown full-width on mobile */
    .notification-dropdown {
        position: fixed;
        left: 12px; right: 12px;
        top: var(--topbar-height);
        width: auto;
    }

    /* Page content padding */
    .page-content { padding: 24px 16px; }
    .page-header h1 { font-size: 24px; }

    /* Slide panel full-width */
    .slide-panel { width: 100%; right: -100%; }

    /* Login toast */
    .login-toast {
        left: 16px; right: 16px;
        bottom: 16px;
    }

    /* Keywords popup */
    .keywords-popup { width: 100%; max-width: 100%; border-radius: 0 0 12px 12px; }

    /* Impersonation bar mobile — bar wraps to 2 lines (text + button),
       so reserve extra space below it for the sidebar/topbar/navbar */
    :root { --impersonation-height: 76px; }
    #impersonation-bar { padding: 8px 12px; font-size: 12px; gap: 4px 8px; }
    .impersonation-text { font-size: 12px; }
    .impersonation-btn { padding: 4px 10px; font-size: 12px; }
}

/* ============================================================
   RESPONSIVE — 480px (Small phone)
   ============================================================ */
@media (max-width: 480px) {
    .container, .container-sm, .container-xs { padding: 0 16px; }
    .hero { padding: 100px 0 60px; }
    .hero h1 { font-size: 30px; letter-spacing: -0.5px; }
    .hero p { font-size: 15px; margin-bottom: 28px; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-stat .number { font-size: 28px; }
    .social-buttons { flex-direction: column; }
    .social-buttons .btn { width: 100%; }
    .verification-inputs input { width: 44px; height: 52px; font-size: 20px; }
    .auth-page { padding: 90px 16px 20px; }
    .auth-card { padding: 28px 20px; }
    .section { padding: 48px 0; }
    .section-header h2 { font-size: 28px; }
    .section-header p { font-size: 15px; }
    .feature-card { padding: 24px; }
    .card { padding: 20px 16px; }
    .pricing-card { padding: 28px 20px; }
    .pricing-card .price { font-size: 40px; }
    .stat-value { font-size: 28px; }
    .page-header h1 { font-size: 20px; }
    .page-content { padding: 20px 12px; }
    .topbar { padding: 0 12px; }
    .btn-lg { padding: 12px 24px; font-size: 15px; }
    .modal { padding: 24px 20px; }
    .modal-header h3 { font-size: 18px; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-btn { padding: 10px 16px; font-size: 13px; white-space: nowrap; }
    .footer { padding: 48px 0 24px; }
    .footer-grid { gap: 24px; }
    .alert { margin: 12px 0; padding: 12px 16px; font-size: 13px; }
    .stats-grid { grid-template-columns: 1fr; gap: 10px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .content-settings-grid { gap: 16px; }
    .billing-grid { gap: 16px; }
    .amount-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .amount-option { padding: 14px 10px; }
    .amount-option .amount { font-size: 22px; }

    /* Keywords popup mobile */
    .keywords-popup-header { padding: 16px 20px; }
    .keywords-popup-body { padding: 20px; }
    .keywords-popup-footer { padding: 12px 20px; flex-wrap: wrap; }
    .keywords-popup-footer .btn { flex: 1; min-width: 120px; }

    /* Credits badge */
    .credits-badge { padding: 10px 16px; font-size: 14px; }

    /* Mini tabs wrap */
    .mini-tabs { flex-wrap: wrap; gap: 6px; }
    .mini-tab { font-size: 12px; padding: 8px 12px; }

    /* Card header compact */
    .card-header h3 { font-size: 18px; }
    .card-header p { font-size: 13px; }
}

/* ============================================================
   RESPONSIVE — 360px (Minimum viable)
   ============================================================ */
@media (max-width: 360px) {
    .container, .container-sm, .container-xs { padding: 0 12px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .auth-card { padding: 24px 16px; border-radius: var(--radius-lg); margin: 12px; }
    .verification-inputs { gap: 6px; }
    .verification-inputs input { width: 38px; height: 46px; font-size: 18px; }
    .amount-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .amount-option { padding: 12px 8px; }
    .amount-option .amount { font-size: 20px; }
    .amount-option .credits { font-size: 11px; }
    .stat-card { padding: 16px 12px; }
    .stat-value { font-size: 24px; }
    .feature-card { padding: 20px 16px; }
    .card { padding: 16px 12px; border-radius: 10px; }
    .page-content { padding: 16px 8px; }
    .page-header h1 { font-size: 18px; }
    .topbar { gap: 8px; }
    .btn { padding: 10px 16px; font-size: 13px; }
    .btn-lg { padding: 12px 20px; font-size: 14px; }
    .modal { padding: 20px 16px; margin: 10px; }
    .pricing-card { padding: 24px 16px; }
    .pricing-card .price { font-size: 36px; }
    .footer { padding: 40px 0 20px; }
    .form-control { padding: 10px 12px; font-size: 13px; }
    .form-label { font-size: 13px; }
    .tab-btn { padding: 8px 12px; font-size: 12px; }
    .content-settings-grid { gap: 12px; }
    .billing-grid { gap: 12px; }
    .form-row { gap: 10px; }
    .keywords-popup-body textarea { font-size: 13px; min-height: 80px; }
    .existing-keyword-item { font-size: 12px; padding: 6px 10px; }
    .credits-badge { font-size: 13px; padding: 8px 14px; }
    .mini-tab { font-size: 11px; padding: 6px 10px; }
}

/* ============================================================
   TOUCH-FRIENDLY ENHANCEMENTS
   ============================================================ */
@media (pointer: coarse) {
    .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .nav-item { min-height: 48px; }
    .form-control { min-height: 48px; }
    .tab-btn { min-height: 44px; }
    .pagination a, .pagination span { width: 44px; height: 44px; }
    .notification-bell { padding: 12px; }
    .mini-tab { min-height: 48px; }
    .amount-option { min-height: 60px; }
}
