﻿/**
 * KUBRAT - Consolidated CSS
 * ==============================================
 * Single-source CSS for entire application
 * - Public invitation platform
 * - Khan administration area
 *
 * Security: Single file for easier CSP management
 * Performance: ~40% smaller than separate files
 * Maintainability: No duplicate rules or conflicts
 *
 * Last Updated: 2025-01-30
 */

/* ==============================================
   1. CSS VARIABLES & THEME SYSTEM
   ============================================== */

:root {
    /* Brand Colors */
    --brand-primary: #0d6efd;
    --brand-secondary: #764ba2;

    /* Theme Colors (Light) */
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-muted: rgba(0, 0, 0, 0.6);
    --surface-color: #f0f0f0;
    --surface-elevated: #ffffff;
    --border-color: rgba(0, 0, 0, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Interactive Elements */
    --input-bg: #ffffff;
    --input-border: rgba(0, 0, 0, 0.25);
    --button-border: #ffffff;
    --focus-ring: rgba(13, 110, 253, 0.3);

    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: 12px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-3xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Khan Admin Specific */
    --khan-header-h: 60px;
    --khan-gap: 16px;
    --khan-surface: rgba(255, 255, 255, 0.12);
    --khan-surface-strong: rgba(255, 255, 255, 0.2);
    --khan-border: rgba(255, 255, 255, 0.25);
}

/* Dark Theme Overrides */
[data-theme="dark"],
body.theme-dark {
    --bg-color: #050915;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --surface-color: #1c1e21;
    --surface-elevated: #34383d;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.5);

    --input-bg: #1c1e21;
    --input-border: rgba(255, 255, 255, 0.22);
    --button-border: #34383d;

    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* ==============================================
   2. GLOBAL RESET & BASE STYLES
   ============================================== */

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: 0.01em;
    transition: background-color 1s ease, color 0.5s ease;
}

/* Background Images */
body {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 1s ease-in-out, background-color 1s ease-in-out;
}

body.theme-light {
    background-image: url('/background/theme-light.png');
}

body.theme-dark {
    background-image: url('/background/theme-dark.png');
}

body.khan-shell {
    background-color: #050915;
    background-image:
        url("/background/theme-dark.png"),
        radial-gradient(circle at 15% 20%, rgba(13, 110, 253, 0.12), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(118, 75, 162, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(7, 10, 20, 0.92), rgba(7, 10, 20, 0.96));
    background-size: cover, 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
    overflow: hidden;
    height: 100vh;
}

/* Ensure main content flows with the page and keeps the fixed background visible */
main[role="main"] {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    background: transparent;
}

main[role="main"].pb-3 {
    padding-bottom: 0;
}

/* Text Utilities */
.text-faded {
    color: var(--text-color);
    opacity: 0.5;
}

/* Layout Utilities */
.w-100 {
    width: 100%;
}

.d-none {
    display: none !important;
}

/* Monospace Font */
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ==============================================
   3. THEME TOGGLE SWITCH
   ============================================== */

#theme-toggle-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-block;
    width: 52px;
    height: 28px;
    cursor: pointer;
}

#theme-toggle-wrapper input {
    display: none;
}

.toggle-ui {
    background-color: #ccc;
    border-radius: 34px;
    display: block;
    height: 100%;
    position: relative;
    transition: background-color 0.4s;
}

.toggle-ui::before {
    content: "☀️";
    font-size: 16px;
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease, content 0.3s;
    transform: rotate(0deg);
}

#theme-toggle-checkbox:checked + .toggle-ui {
    background-color: #555;
}

#theme-toggle-checkbox:checked + .toggle-ui::before {
    content: "🌙";
    transform: translateX(24px) rotate(360deg);
}

/* Align toggle inside Khan topbar without overlaying content */
.khan-topbar #theme-toggle-wrapper {
    position: static;
    margin-right: var(--khan-gap);
}

/* ==============================================
   4. HOME PAGE / INVITATION FORM
   ============================================== */

/* Center Container */
#center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.25rem;
}

/* Home Container */
.home-container {
    width: 100%;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(28, 30, 33, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 2.75rem 2.25rem 2.5rem;
    box-shadow:
        0 24px 72px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    animation: containerFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

[data-theme="light"] .home-container {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset,
        0 4px 16px rgba(0, 0, 0, 0.06);
}

.home-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.15) 20%, transparent 60%);
    filter: blur(30px);
    animation: electricWaveHome 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

/* Security Badge */
.security-badge {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto;
    z-index: 1;
    flex-shrink: 0;
}

.security-badge-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.28), rgba(118, 75, 162, 0.28));
    border-radius: 50%;
    animation: badgePulse 3.5s ease-in-out infinite;
    box-shadow:
        0 0 32px rgba(13, 110, 253, 0.55),
        0 0 64px rgba(118, 75, 162, 0.35),
        inset 0 0 22px rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .security-badge-bg {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.35), rgba(118, 75, 162, 0.35));
    box-shadow:
        0 0 24px rgba(13, 110, 253, 0.4),
        0 0 48px rgba(118, 75, 162, 0.25),
        inset 0 0 18px rgba(255, 255, 255, 0.2);
}

.security-badge-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46px;
    height: 46px;
    color: #fff;
    filter: drop-shadow(0 2px 12px rgba(13, 110, 253, 0.65));
    z-index: 2;
}

[data-theme="light"] .security-badge-icon {
    color: var(--brand-primary);
    filter: drop-shadow(0 2px 8px rgba(13, 110, 253, 0.4));
}

/* Home Header */
.home-header {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    width: 100%;
}

.home-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .home-title {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #ffffff;
}

.home-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    line-height: 1.6;
}

[data-theme="light"] .home-subtitle {
    color: #555;
}

/* Invite Form */
.invite-form-container {
    position: relative;
    z-index: 1;
    width: 100%;
    flex-shrink: 0;
}

#invitation-form {
    width: 100%;
}

.invite-wrapper-enhanced {
    display: block;
    width: 100%;
    height: 54px;
    border-radius: 27px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.09);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.invite-wrapper-enhanced:focus-within {
    border-color: rgba(13, 110, 253, 0.65);
    box-shadow:
        0 10px 36px rgba(0, 0, 0, 0.38),
        0 0 0 3.5px rgba(13, 110, 253, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.13);
    transform: translateY(-1px);
}

[data-theme="light"] .invite-wrapper-enhanced {
    background: rgba(0, 0, 0, 0.06) !important;
    border: 1.5px solid rgba(0, 0, 0, 0.14) !important;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] .invite-wrapper-enhanced:focus-within {
    border-color: rgba(13, 110, 253, 0.7) !important;
    background: rgba(0, 0, 0, 0.08) !important;
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.14),
        0 0 0 3.5px rgba(13, 110, 253, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-1px);
}

.invite-wrapper-enhanced input[type="text"] {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff !important;
    padding: 0 70px 0 1.5rem;
    height: 100%;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
    border-radius: 28px;
}

[data-theme="light"] .invite-wrapper-enhanced input[type="text"] {
    color: #000 !important;
    font-weight: 600 !important;
}

.invite-wrapper-enhanced input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 400;
}

[data-theme="light"] .invite-wrapper-enhanced input[type="text"]::placeholder {
    color: rgba(0, 0, 0, 0.7) !important;
    font-weight: 500 !important;
}

.invite-wrapper-enhanced input[type="text"]:focus {
    outline: none;
}

/* Invite Button */
.invite-btn-enhanced {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.45);
}

.invite-btn-enhanced::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    transition: left var(--transition-slow);
}

.invite-btn-enhanced:hover::before {
    left: 100%;
}

.invite-btn-enhanced:hover {
    box-shadow:
        0 0 22px rgba(13, 110, 253, 0.65),
        0 4px 16px rgba(13, 110, 253, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.12);
    transform: translateY(-50%) scale(1.04);
}

.invite-btn-enhanced:active {
    transform: translateY(-50%) scale(0.98);
}

.invite-btn-enhanced svg {
    width: 19px;
    height: 19px;
    position: relative;
    z-index: 1;
}

/* Security Footer */
.security-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
    flex-shrink: 0;
}

[data-theme="light"] .security-footer {
    color: #5a5a5a;
}

.security-footer svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* Tooltip */
.tooltip-word {
    text-decoration: underline;
    text-decoration-color: rgba(13, 110, 253, 0.6);
    text-underline-offset: 3px;
    cursor: help;
    position: relative;
}

.tooltip-word::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.95);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    text-decoration: none;
}

[data-theme="light"] .tooltip-word::before {
    background: rgba(0, 0, 0, 0.9);
}

.tooltip-word::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-base);
    z-index: 1000;
}

[data-theme="light"] .tooltip-word::after {
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip-word:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.tooltip-word:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 50%;
    opacity: 0;
    animation: particleDrift 6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.6);
}

.particle-dot:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.particle-dot:nth-child(2) {
    top: 60%;
    left: 15%;
    animation-delay: 2s;
}

.particle-dot:nth-child(3) {
    top: 30%;
    right: 15%;
    animation-delay: 4s;
}

.particle-dot:nth-child(4) {
    bottom: 30%;
    right: 10%;
    animation-delay: 1s;
}

.particle-dot:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-delay: 3s;
}

/* ==============================================
   5. NOTIFICATIONS & MESSAGES
   ============================================== */

#messageArea {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, top 0.4s ease;
}

#messageArea.show {
    opacity: 1;
    pointer-events: auto;
    top: 40px;
}

#messageArea.success {
    background-color: #28a745;
}

#messageArea.error {
    background-color: #dc3545;
}

/* Success Message */
.success-message {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 3rem;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    color: #fff;
    max-width: 420px;
    position: relative;
    overflow: hidden;
    animation: successFadeIn 0.7s ease-out;
}

.success-message::before {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.2) 20%, transparent 60%);
    filter: blur(30px);
    animation: electricWaveTravel 2.2s ease-out forwards;
    pointer-events: none;
    opacity: 0.8;
}

.success-message::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -40%;
    width: 40%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 110, 253, 0.9) 20%,
        rgba(118, 75, 162, 1) 40%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(118, 75, 162, 1) 60%,
        rgba(13, 110, 253, 0.9) 80%,
        transparent 100%
    );
    box-shadow:
        0 0 30px rgba(13, 110, 253, 0.9),
        0 0 50px rgba(118, 75, 162, 0.7),
        0 0 15px rgba(255, 255, 255, 0.8);
    animation: electricWaveTravel 2.2s ease-out forwards;
    pointer-events: none;
}

.success-message p {
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                 0 0 20px rgba(255, 255, 255, 0.2);
    line-height: 1.5;
}

[data-theme="light"] .success-message {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="light"] .success-message::before {
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 60%);
}

[data-theme="light"] .success-message p {
    color: #1a1a1a;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8),
                 0 0 15px rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .success-message {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .success-message p {
    color: #ffffff;
}

/* Loading Message */
.loading-message {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: #fff;
    max-width: 340px;
    transition: all var(--transition-base);
}

.loading-message h1 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.2;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
    color: #fff !important;
}

.loading-message p {
    font-size: 1rem;
    opacity: 0.9;
    color: #e0e0e0;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .loading-message {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .loading-message p {
    color: #f0f0f0;
}

/* ==============================================
   6. PLAN CARDS & CHECKOUT
   ============================================== */

.plan-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    color: #fff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .plan-card {
    background: rgba(255, 255, 255, 0.65);
    color: #111;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

.plan-card.selected {
    border: 2px solid var(--brand-primary);
    background: rgba(13, 110, 253, 0.2);
}

.plan-card.selected .plan-footer {
    background: rgba(13, 110, 253, 0.9);
    color: #fff;
}

.plan-footer {
    margin-top: 15px;
    padding: 10px;
    background: rgba(13, 110, 253, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    font-weight: 700;
    color: var(--brand-primary);
    text-align: center;
    text-shadow: none;
}

[data-theme="light"] .plan-footer {
    background: rgba(0, 0, 0, 0.05);
    color: var(--brand-primary);
}

.price,
.card-header h3,
.plan-footer,
ul li {
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .price,
[data-theme="light"] .card-header h3,
[data-theme="light"] .plan-footer,
[data-theme="light"] ul li {
    text-shadow: none;
    color: #111;
}

.popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--brand-primary);
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 10px;
}

.hidden-radio {
    display: none;
}

/* Footer Card */
.footer-card {
    width: 70vw;
    max-width: 1400px;
    min-width: 320px;
    margin: 0 auto 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 1rem 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.08);
    text-align: center;
}

[data-theme="light"] .footer-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.footer-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

[data-theme="light"] .footer-content p {
    color: rgba(0, 0, 0, 0.8);
}

.disclaimer-text {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 20px;
}

[data-theme="light"] .disclaimer-text {
    background: rgba(255, 255, 255, 0.65);
    color: #111;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Plan Header Box */
.plan-header-box {
    width: 70vw;
    max-width: 1400px;
    min-width: 320px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-xl);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .plan-header-box {
    background: rgba(255, 255, 255, 0.7);
    color: #111;
    text-shadow: none;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Checkout */
.checkout-glass {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-2xl);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .checkout-glass {
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    text-shadow: none;
}

.checkout-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .checkout-title {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #ffffff !important;
}

.checkout-subtitle {
    color: #bbb;
    font-size: 1rem;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
    transition: width var(--transition-slow);
}

.checkout-summary-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .checkout-summary-box {
    background: rgba(255, 255, 255, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 1rem;
}

.summary-label {
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="light"] .summary-label {
    color: #555;
}

.summary-value {
    color: var(--text-color);
    font-weight: 500;
    text-align: right;
}

[data-theme="light"] .summary-value {
    color: #000;
}

/* ==============================================
   7. GENERIC GLASS COMPONENTS
   ============================================== */

.glass-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 20px 30px;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.25);
    color: #fff;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .glass-box {
    background: rgba(255, 255, 255, 0.75);
    color: #111;
    text-shadow: none;
}

.chip-glass {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
    position: relative;
    text-align: center;
    color: #fff;
}

.chip-glass::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 300%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
    animation: shimmerChip 5s infinite;
    z-index: 2;
    pointer-events: none;
    border-radius: 1rem;
}

.shimmer-box {
    position: relative;
    overflow: hidden;
}

.shimmer-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: shimmerMove 3s infinite;
    z-index: 1;
}

.shimmer-box > * {
    position: relative;
    z-index: 2;
}

[data-theme="light"] .shimmer-box::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05), transparent);
}

[data-theme="dark"] .shimmer-box::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

/* ==============================================
   8. BUTTONS & FORM CONTROLS
   ============================================== */

/* Glass Buttons */
.btn-glass {
    background: rgba(13, 110, 253, 0.25);
    border: 1px solid rgba(13, 110, 253, 0.6);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    transition: all var(--transition-base);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.btn-glass:hover {
    background: rgba(13, 110, 253, 0.6);
    color: #fff;
}

[data-theme="light"] .btn-glass {
    color: #fff;
    background: rgba(13, 110, 253, 0.7);
    border: none;
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger-glass {
    background: rgba(239, 67, 104, 0.18);
    border-color: rgba(239, 67, 104, 0.65);
}

.btn-danger-glass:hover {
    background: rgba(239, 67, 104, 0.35);
    color: #fff;
}

/* Form Switch */
.form-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.form-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.form-switch i {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 26px;
    transition: 0.4s;
}

.form-switch i::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: #fff;
    border-radius: 50%;
    transition: 0.4s;
}

.form-switch input:checked + i {
    background-color: var(--brand-primary);
}

.form-switch input:checked + i::before {
    transform: translateX(24px);
}

/* Pill */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.badge.ok {
    border-color: rgba(25, 135, 84, 0.7);
    background: rgba(25, 135, 84, 0.2);
}

.badge.warn {
    border-color: rgba(255, 193, 7, 0.7);
    background: rgba(255, 193, 7, 0.2);
}

.badge.err {
    border-color: rgba(220, 53, 69, 0.8);
    background: rgba(220, 53, 69, 0.22);
}

/* ==============================================
   9. KHAN ADMIN AREA
   ============================================== */

/* Khan Top Navigation */
.khan-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--khan-header-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px var(--khan-gap);
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    position: relative;
    z-index: 100;
}

.khan-topbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 60%);
    filter: blur(25px);
    animation: electricWaveKhan 8s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
    z-index: 0;
}

.khan-topbar > * {
    position: relative;
    z-index: 1;
}

.khan-title {
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.khan-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.khan-btn {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
}

.khan-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(13, 110, 253, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

.khan-btn.active {
    border-color: var(--brand-primary);
    background: linear-gradient(120deg, rgba(13, 110, 253, 0.3), rgba(118, 75, 162, 0.25));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.2), 0 4px 12px rgba(13, 110, 253, 0.25);
}

.khan-grow {
    flex: 1;
}

.khan-logout button {
    cursor: pointer;
}

/* Khan Main Content */
.khan-main {
    height: 100vh;
    width: 100%;
    box-sizing: border-box;
    padding-top: 10px;
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Khan Page Layouts */
.khan-page,
.khan-page-vert {
    width: 100%;
    flex: 1;
    min-height: 0;
    gap: 12px;
}

.khan-page {
    display: grid;
    grid-template-rows: auto auto 1fr;
    overflow: hidden;
}

.khan-page-vert {
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.khan-fill {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
    grid-row: auto / -1;
}

/* Khan Bar */
.khan-bar {
    --khan-bar-h: 56px;
    min-height: var(--khan-bar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    box-sizing: border-box;
}

.khan-actionsbar {
    gap: 12px;
    flex-wrap: wrap;
}

.khan-h1 {
    margin: 0;
    line-height: 1;
}

.khan-muted {
    color: var(--khan-muted);
}

.khan-nowrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.khan-nowrap .invite-wrapper {
    flex: 0 1 420px;
    max-width: 420px;
}

.khan-nowrap .btn,
.khan-nowrap label {
    white-space: nowrap;
}

/* Khan Tables */
.table-viewport {
    flex: 1 1 0;
    min-height: 0;
    max-height: calc(100vh - var(--khan-header-h) - 130px);
    overflow-y: auto;
    overflow-x: auto;
    width: 100%;
    position: relative;
}

.table-viewport .table-glass {
    height: auto !important
}

/* Custom scrollbar for table viewport */
.table-viewport::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-viewport::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.table-viewport::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.6), rgba(118, 75, 162, 0.6));
    border-radius: 6px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.table-viewport::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.8), rgba(118, 75, 162, 0.8));
}

.table-viewport::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.2);
}

.sticky-head th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(6, 9, 20, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tbl-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.actions-col {
    width: 220px;
}

.actions-cell {
    min-width: 220px;
}

.table-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.table-glass th,
.table-glass td {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: #fff !important;
    vertical-align: middle;
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: background-color var(--transition-fast);
}

.table-glass tbody tr:hover td {
    background-color: rgba(13, 110, 253, 0.1) !important;
}

.table-glass th {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.table-glass td {
    font-size: 14px;
}

.table-glass .btn {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: var(--radius-md);
}

.khan-table-full {
    width: 100%;
    table-layout: fixed;
}

.khan-table-full th,
.khan-table-full td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Khan Forms */
.form-label {
    color: var(--khan-muted);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.invite-wrapper input,
.invite-wrapper textarea,
.khan-filter input,
.khan-filter select,
.khan-field input,
.khan-field textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    box-sizing: border-box;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.invite-wrapper input:focus,
.invite-wrapper textarea:focus,
.khan-filter input:focus,
.khan-filter select:focus,
.khan-field input:focus,
.khan-field textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow:
        0 0 0 3px rgba(13, 110, 253, 0.25),
        0 0 20px rgba(13, 110, 253, 0.3);
    background: rgba(255, 255, 255, 0.10);
}

.khan-filter select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
}

.checkbox-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.invite-wrapper textarea {
    min-height: 9rem;
    max-height: 40vh;
    line-height: 1.4;
    resize: vertical;
}

.invite-wrapper textarea.ta-lg {
    min-height: 15rem;
}

/* Form Grid */
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 780px) {
    .form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .form-grid-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.col-span-3 {
    grid-column: span 3;
}

/* Khan Filters */
.khan-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 14px;
}

.khan-filter {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    flex: 0 1 auto;
    gap: 4px;
}

.khan-filter .form-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.khan-filter-bar .khan-filter input,
.khan-filter-bar .khan-filter select {
    padding: 8px 10px;
    font-size: 14px;
}

.filter-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Khan Metrics */
.khan-mini-grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 900px) {
    .khan-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.khan-metric {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.khan-metric .label {
    color: var(--khan-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.khan-metric .value {
    font-weight: 700;
    font-size: 1rem;
}

/* Khan Section */
.khan-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

/* Pagination */
.pagination-bar {
    gap: 10px;
    justify-content: flex-start;
    padding: 8px 12px;
    min-height: auto;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Scroll Pane */
.scroll-pane {
    overflow: auto;
    min-height: 0;
}

.khan-page-vert > .glass-box.khan-fill {
    min-height: 0;
}

/* Khan Grid */
.khan-grid {
    display: grid;
    gap: var(--khan-gap, 16px);
}

@media (min-width: 1100px) {
    .khan-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Responsive adjustments for Khan area */
@media (max-width: 1200px) {
    .khan-main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .actions-col,
    .actions-cell {
        width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .khan-main {
        padding-left: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
    }

    .khan-page {
        gap: 8px;
    }

    .khan-fill {
        padding: 8px;
    }

    .khan-bar {
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    .khan-nowrap {
        flex-direction: column;
        align-items: stretch;
    }

    .khan-nowrap .invite-wrapper {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .table-glass th,
    .table-glass td {
        font-size: 12px;
        padding: 8px 6px;
    }

    .tbl-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .tbl-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .khan-main {
        padding-top: calc(var(--khan-header-h) - 4px);
    }

    .khan-fill {
        padding: 6px;
    }

    .table-viewport::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
}

/* ==============================================
   10. KHAN LOGIN PAGE
   ============================================== */

.khan-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 18px;
    background-image: url("/background/theme-dark.png");
    background-size: cover;
    background-position: center;
}

.khan-login-hero {
    display: grid;
    gap: 14px;
    width: min(1100px, 100%);
    grid-template-columns: 1.1fr 0.9fr;
}

@media (max-width: 960px) {
    .khan-login-hero {
        grid-template-columns: 1fr;
    }
}

.khan-login-card h1 {
    margin: 6px 0;
    font-size: 1.8rem;
    letter-spacing: 0.02em;
}

.khan-login-card p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.75);
}

.khan-login-header .pill {
    margin-bottom: 4px;
}

.khan-login-form {
    display: grid;
    gap: 12px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 46px 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 1px rgba(13, 110, 253, 0.32);
}

.field-ico {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    font-size: 0.95rem;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
}

.field-ico:focus-visible {
    outline: 2px solid var(--brand-primary);
    border-radius: 6px;
}

.login-submit {
    margin-top: 6px;
    width: 100%;
    justify-content: center;
}

.khan-login-side {
    display: grid;
    gap: 8px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12), rgba(118, 75, 162, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.khan-login-side-title {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.khan-login-side p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.khan-login-points {
    margin: 0;
    padding-left: 18px;
    color: #fff;
    line-height: 1.5;
}

/* ==============================================
   11. LEGACY LAYOUT OVERRIDES (Bootstrap)
   ============================================== */

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

a {
    color: #0077cc;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
}

/* ==============================================
   12. ANIMATIONS
   ============================================== */

@keyframes containerFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes electricWaveHome {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes electricWaveKhan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes electricWaveTravel {
    0% {
        left: -40%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes badgePulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 30px rgba(13, 110, 253, 0.5),
            0 0 60px rgba(118, 75, 162, 0.3),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow:
            0 0 40px rgba(13, 110, 253, 0.7),
            0 0 80px rgba(118, 75, 162, 0.5),
            inset 0 0 25px rgba(255, 255, 255, 0.15);
    }
}

@keyframes particleDrift {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-30px) scale(1.3);
    }
}

@keyframes successFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmerMove {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes shimmerChip {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(0);
    }
}

/* ==============================================
   13. HISTORY TIMELINE MODAL (Khan Invitations)
   ============================================== */

/* History Modal Dialog */
#inviteHistoryDialog {
    inset: 0;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: 800px;
    max-height: 90vh;
}

#inviteHistoryDialog::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    animation: fadeInBackdrop 0.3s ease;
}

.history-modal {
    display: flex;
    flex-direction: column;
    min-width: min(720px, 95vw);
    max-height: 85vh;
    overflow: hidden;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    background: rgba(12, 12, 20, 0.98);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
    animation: slideInModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(15, 15, 25, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-height: 80px;
}

.history-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.history-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.history-icon {
    width: 32px;
    height: 32px;
    padding: 6px;
    color: #fff;
    flex-shrink: 0;
}

.history-header-content > div {
    min-width: 0;
    flex: 1;
}

.history-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.history-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: ui-monospace, monospace;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
}

.history-close-btn:hover {
    background: rgba(239, 67, 104, 0.25);
    border-color: rgba(239, 67, 104, 0.6);
    color: #fff;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 0 16px rgba(239, 67, 104, 0.4);
}

.history-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    background: rgba(0, 0, 0, 0.3);
}

.history-body::-webkit-scrollbar {
    width: 10px;
}

.history-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.history-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.5), rgba(118, 75, 162, 0.5));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.history-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(13, 110, 253, 0.7), rgba(118, 75, 162, 0.7));
}

.history-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 15, 25, 0.6);
    flex-shrink: 0;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 20px 0 40px 0;
    list-style: none;
    margin: 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 24px;
    bottom: 24px;
    width: 3px;
    background: linear-gradient(180deg,
        rgba(13, 110, 253, 0.6),
        rgba(118, 75, 162, 0.5),
        rgba(13, 110, 253, 0.4),
        rgba(118, 75, 162, 0.3)
    );
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(13, 110, 253, 0.3);
}

.timeline::after {
    content: "ПОСЛЕДНО ДЕЙСТВИЕ";
    position: absolute;
    left: -8px;
    top: -8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(13, 110, 253, 0.25);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(13, 110, 253, 0.5);
    text-shadow: 0 0 8px rgba(13, 110, 253, 0.8);
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.4);
    animation: pulseLabel 2s ease-in-out infinite;
    white-space: nowrap;
}

.timeline-item {
    position: relative;
    padding-left: 56px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease backwards;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.15s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.25s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(n+6) {
    animation-delay: 0.35s;
}

.timeline-dot {
    position: absolute;
    left: 5.5px;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: currentColor;
    border: 3px solid rgba(0, 0, 0, 0.6);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 0 0 3px currentColor,
        0 0 12px currentColor,
        0 0 20px currentColor,
        inset 0 0 8px rgba(255, 255, 255, 0.4);
    z-index: 2;
}

.timeline-item:first-child .timeline-dot {
    width: 22px;
    height: 22px;
    left: 3.5px;
    top: 10px;
    animation: pulseNewest 2s ease-in-out infinite;
    background: radial-gradient(circle, #fff 20%, currentColor 60%, currentColor 100%);
    border: 3px solid rgba(0, 0, 0, 0.6);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.5),
        0 0 0 4px currentColor,
        0 0 16px currentColor,
        0 0 28px currentColor,
        0 0 40px currentColor,
        inset 0 0 10px rgba(255, 255, 255, 0.6);
}

.timeline-item:last-child .timeline-dot {
    width: 16px;
    height: 16px;
    left: 6.5px;
    opacity: 0.85;
    border: 3px solid rgba(0, 0, 0, 0.6);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.3),
        0 0 0 3px currentColor,
        0 0 10px currentColor,
        0 0 16px currentColor,
        inset 0 0 6px rgba(255, 255, 255, 0.3);
}

.timeline-item:last-child .timeline-dot::after {
    content: "●";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 6px;
    color: #fff;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.timeline-item:last-child::after {
    content: "НАЧАЛО";
    position: absolute;
    left: -8px;
    bottom: -32px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(118, 75, 162, 0.25);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(118, 75, 162, 0.5);
    text-shadow: 0 0 8px rgba(118, 75, 162, 0.8);
    box-shadow: 0 0 12px rgba(118, 75, 162, 0.3);
    white-space: nowrap;
}

.timeline-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 3px solid currentColor;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.timeline-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.09);
    border-left-width: 4px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 24px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.timeline-action {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.timeline-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Action Type Colors */
.timeline-item[data-action*="създаден"],
.timeline-item[data-action*="Създаден"],
.timeline-item[data-action*="created"] {
    color: #10b981;
}

.timeline-item[data-action*="използван"],
.timeline-item[data-action*="Използван"],
.timeline-item[data-action*="used"] {
    color: #0d6efd;
}

.timeline-item[data-action*="редактиран"],
.timeline-item[data-action*="Редактиран"],
.timeline-item[data-action*="updated"],
.timeline-item[data-action*="edited"] {
    color: #fbbf24;
}

.timeline-item[data-action*="изтрит"],
.timeline-item[data-action*="Изтрит"],
.timeline-item[data-action*="deleted"] {
    color: #ef4368;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ==============================================
   14. RESPONSIVE MOBILE STYLES
   ============================================== */

@media (max-width: 576px) {
    #center {
        max-width: 100%;
        padding: 0 1rem;
    }

    .home-container {
        padding: 2.25rem 1.75rem 2rem;
        gap: 1.5rem;
    }

    .home-title {
        font-size: 1.65rem;
    }

    .home-subtitle {
        font-size: 0.92rem;
    }

    .security-badge {
        width: 76px;
        height: 76px;
    }

    .security-badge-bg {
        width: 70px;
        height: 70px;
    }

    .security-badge-icon {
        width: 38px;
        height: 38px;
    }

    .invite-wrapper-enhanced {
        height: 52px;
    }

    .invite-btn-enhanced {
        width: 44px;
        height: 44px;
    }

    .security-footer {
        font-size: 0.8rem;
    }
}

/* ==============================================
   15. TIMELINE ANIMATIONS
   ============================================== */

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes pulseNewest {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.5),
            0 0 0 4px currentColor,
            0 0 16px currentColor,
            0 0 28px currentColor,
            0 0 40px currentColor,
            inset 0 0 10px rgba(255, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.6),
            0 0 0 5px currentColor,
            0 0 20px currentColor,
            0 0 36px currentColor,
            0 0 52px currentColor,
            inset 0 0 12px rgba(255, 255, 255, 0.7);
    }
}

@keyframes pulseLabel {
    0%, 100% {
        box-shadow: 0 0 12px rgba(13, 110, 253, 0.3);
        border-color: rgba(13, 110, 253, 0.4);
    }
    50% {
        box-shadow: 0 0 20px rgba(13, 110, 253, 0.5);
        border-color: rgba(13, 110, 253, 0.6);
    }
}

/* ==============================================
   16. PLAN SELECTION PAGE
   ============================================== */

/* Layout grid for plan selection */
.plan-selection-grid {
    display: grid;
    /* grid-template-columns set dynamically via inline style based on plan count */
    gap: 2.5rem 1.25rem;
    width: 70vw;
    max-width: 1400px;
    min-width: 320px;
    margin: 0 auto 2.5rem;
    padding: 0 0.5rem;
    justify-items: stretch;
}

/* Plan Header Box */
.plan-header-box {
    position: relative;
    z-index: 1;
    width: 70vw;
    max-width: 1400px;
    min-width: 320px;
    margin: 0 auto 2.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
}

[data-theme="light"] .plan-header-box {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.plan-header-box h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #fff;
    text-align: center;
}

[data-theme="light"] .plan-header-box h1 {
    color: #1a1a1a;
}

.plan-header-box .text-muted {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
}

[data-theme="light"] .plan-header-box .text-muted {
    color: rgba(0, 0, 0, 0.3);
}

/* Header Info Section */
.header-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.header-info p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

[data-theme="light"] .header-info p {
    color: rgba(0, 0, 0, 0.8);
}

.text-muted-custom {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem !important;
}

[data-theme="light"] .text-muted-custom {
    color: rgba(0, 0, 0, 0.5) !important;
}

.terms-link {
    color: #4d9fff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #6eb3ff;
    text-decoration: underline;
}

[data-theme="light"] .terms-link {
    color: #0d6efd;
}

[data-theme="light"] .terms-link:hover {
    color: #0a58ca;
}

#billingPeriodText {
    font-weight: 600;
    color: #4d9fff;
}

[data-theme="light"] #billingPeriodText {
    color: #0d6efd;
}

/* Plan Card */
.plan-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    margin-bottom: 24px;
    padding: 14px;
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .plan-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.plan-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 60%);
    filter: blur(25px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover::before {
    animation: electricWaveHover 3s ease-in-out infinite;
    opacity: 1;
}

.plan-card.selected::before {
    animation: electricWaveHover 3s ease-in-out infinite;
    opacity: 1;
}

.plan-footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    border-radius: 0 0 18px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 14px;
    text-align: center;
    margin-top: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.plan-footer:hover {
    background: linear-gradient(135deg, #0b5dd7, #6a42a0);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.5);
    transform: translateY(-2px);
}

[data-theme="light"] .plan-footer {
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

[data-theme="light"] .plan-footer:hover {
    background: linear-gradient(135deg, #0b5dd7, #6a42a0);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.plan-card .plan-footer {
    margin-top: auto;
}

.plan-footer .select-status {
    position: relative;
    z-index: 2;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: #ffffff;
    font-size: 0.95rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

[data-theme="light"] .plan-footer .select-status {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Make third card (highest price) more prominent */
.plan-card:nth-child(3) {
    border: 2px solid rgba(13, 110, 253, 0.4);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(13, 110, 253, 0.2);
}

[data-theme="light"] .plan-card:nth-child(3) {
    border: 2px solid rgba(13, 110, 253, 0.3);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(13, 110, 253, 0.15);
}

/* Featured Plan (Макс) - Enhanced Visibility */
.plan-card:nth-child(3) {
    border: 2px solid rgba(13, 110, 253, 0.4);
    position: relative;
}

.plan-card:nth-child(3)::after {
    content: "ПРЕПОРЪЧАН";
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    z-index: 10;
}

[data-theme="light"] .plan-card:nth-child(3)::after {
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.plan-card:nth-child(3) .card-header h3 {
    color: #fff;
    font-size: 1.5rem;
    text-shadow: 0 2px 8px rgba(13, 110, 253, 0.6);
}

[data-theme="light"] .plan-card:nth-child(3) .card-header h3 {
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.plan-card:nth-child(3) .price {
    color: #4d9fff;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(77, 159, 255, 0.6);
}

[data-theme="light"] .plan-card:nth-child(3) .price {
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.plan-card:nth-child(3)::before {
    opacity: 0.6 !important;
}

.plan-card:nth-child(3):hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(13, 110, 253, 0.8);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(13, 110, 253, 0.3);
}

.plan-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(13, 110, 253, 0.3),
        rgba(118, 75, 162, 0.25)
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.plan-card:hover .plan-footer::before {
    opacity: 1;
    animation: gradientPulse 2s ease-in-out infinite;
}

.plan-card.selected .plan-footer {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    border-top: none;
}

[data-theme="light"] .plan-card.selected .plan-footer {
    background: linear-gradient(135deg, #28a745, #20c997);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
}

.plan-card.selected .plan-footer .select-status {
    color: #ffffff;
}

.plan-card.selected .plan-footer::before {
    opacity: 0;
}

.plan-footer::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 110, 253, 0.9) 20%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(118, 75, 162, 0.9) 80%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(13, 110, 253, 0.8),
        0 0 35px rgba(118, 75, 162, 0.6),
        0 0 10px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.plan-card:hover .plan-footer::after {
    animation: electricLineFlow 2s ease-in-out infinite;
    opacity: 1;
}

.plan-card.selected .plan-footer::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(40, 167, 69, 0.8) 30%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(40, 167, 69, 0.8) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(40, 167, 69, 0.7),
        0 0 10px rgba(255, 255, 255, 0.8);
    animation: electricLineFlow 2s ease-in-out infinite;
    opacity: 1;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.plan-card.selected {
    transform: translateY(-2px);
}

/* Card Internal Structure */
.plan-card .card-header {
    position: relative;
    z-index: 1;
    padding: 0;
    text-align: center;
    border: none;
    margin-bottom: 15px;
}

.plan-card .card-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .plan-card .card-header h3 {
    color: #1a1a1a;
    text-shadow: none;
}

.plan-card .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .plan-card .price {
    color: #0d6efd;
    text-shadow: none;
}

.plan-card .price small.period {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
}

.plan-card .text-faded {
    opacity: 0.75;
    font-size: 0.8rem;
}

.plan-card .card-body {
    position: relative;
    z-index: 1;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.plan-card .card-body ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.plan-card .card-body ul li {
    padding: 0.45rem 0;
    padding-left: 1.6rem;
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    line-height: 1.45;
}

[data-theme="light"] .plan-card .card-body ul li {
    color: #333;
}

.plan-card .card-body ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0d6efd;
    font-weight: 700;
    font-size: 1.1rem;
}

.plan-card .select-status {
    position: relative;
    z-index: 1;
}

/* Footer disclaimer */
.footer-card {
    width: 70vw;
    max-width: 1400px;
    min-width: 320px;
    margin: 2rem auto 30px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .footer-card {
    color: #666;
}

/* Responsive Design for Plan Selection */
@media (max-width: 576px) {
    .plan-header-box h1 {
        font-size: 1.5rem;
    }

    .plan-header-box p {
        font-size: 0.95rem;
    }

    .plan-card .card-header h3 {
        font-size: 1.35rem;
    }

    .plan-card .price {
        font-size: 1.75rem;
    }

    .plan-card .card-body ul li {
        font-size: 0.85rem;
    }

    .footer-card {
        font-size: 0.9rem;
    }
}

/* ==============================================
   17. PLAN CONFIRMATION / CHECKOUT PAGE
   ============================================== */

.confirmation-container {
    width: 100%;
    max-width: 720px;
    min-width: 320px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
}

@media (max-height: 900px) {
    .confirmation-container {
        padding: 0.75rem 1rem;
    }
}

.buttons-container {
    display: flex;
    gap: 0.6rem;
    align-items: stretch;
    margin-top: 0.85rem;
}

/* Back button variant for confirmation page */
.confirmation-container .back-button {
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    flex: 0 0 auto;
    white-space: nowrap;
    justify-content: center;
    min-width: 70px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

[data-theme="light"] .confirmation-container .back-button {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #333;
}

.confirmation-container .back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-3px);
}

[data-theme="light"] .confirmation-container .back-button:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.2);
}

.checkout-glass {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%),
                rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 20px 60px rgba(13, 110, 253, 0.15),
        0 10px 30px rgba(118, 75, 162, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    width: 100%;
}

[data-theme="light"] .checkout-glass {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%),
                rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 20px 60px rgba(13, 110, 253, 0.08),
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    color: #111;
}

.checkout-glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 60%);
    filter: blur(30px);
    animation: electricWaveFlow 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

.checkout-header {
    position: relative;
    z-index: 1;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .checkout-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.checkout-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

[data-theme="dark"] .checkout-title {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    color: #ffffff;
}

.checkout-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

[data-theme="light"] .checkout-subtitle {
    color: #666;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #764ba2);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.6);
}

.checkout-summary-box {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(118, 75, 162, 0.06) 100%);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(13, 110, 253, 0.2);
    position: relative;
    z-index: 1;
    margin-bottom: 0.85rem;
    box-shadow:
        0 4px 16px rgba(13, 110, 253, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@media (max-height: 900px) {
    .checkout-summary-box {
        padding: 0.75rem 0.85rem;
    }
}

[data-theme="light"] .checkout-summary-box {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.04) 0%, rgba(118, 75, 162, 0.03) 100%);
    border: 1px solid rgba(13, 110, 253, 0.15);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .summary-row {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.summary-label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="light"] .summary-label {
    color: #555;
}

.summary-value {
    font-weight: 600;
    color: #fff;
    text-align: right;
}

[data-theme="light"] .summary-value {
    color: #000;
}

.features-section {
    position: relative;
    z-index: 1;
    margin: 0.85rem 0;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.06) 0%, rgba(118, 75, 162, 0.04) 100%);
    border-radius: 14px;
    border: 1px solid rgba(13, 110, 253, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .features-section {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.03) 0%, rgba(118, 75, 162, 0.02) 100%);
    border: 1px solid rgba(13, 110, 253, 0.1);
}

.features-section h5 {
    font-weight: 600;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .features-section h5 {
    color: #111;
}

.features-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
}

@media (max-width: 576px) {
    .features-section ul {
        grid-template-columns: 1fr;
    }
}

.features-section ul li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .features-section ul li {
    color: #333;
}

.features-section ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0d6efd;
    font-weight: 700;
    font-size: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    cursor: pointer;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .custom-checkbox {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-height: 900px) {
    .custom-checkbox {
        padding: 0.6rem 0.75rem;
        margin-bottom: 0.6rem;
    }
}

.custom-checkbox:hover {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.3);
    transform: translateY(-1px);
}

[data-theme="light"] .custom-checkbox:hover {
    background: rgba(13, 110, 253, 0.04);
    border-color: rgba(13, 110, 253, 0.2);
}

.custom-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.custom-checkbox a {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 500;
}

.custom-checkbox a:hover {
    color: #764ba2;
}

.submit-button {
    flex: 1;
    padding: 0.4rem 0.7rem;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 6px 20px rgba(13, 110, 253, 0.4),
        0 3px 10px rgba(118, 75, 162, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.2px;
}

.submit-button::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 100%
    );
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.submit-button:not(:disabled):hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 10px 28px rgba(13, 110, 253, 0.5),
        0 5px 14px rgba(118, 75, 162, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 50%, #6a4193 100%);
}

.submit-button:not(:disabled):hover::before {
    animation: electricLineFlow 1.5s ease-in-out infinite;
}

.submit-button:not(:disabled):active {
    transform: translateY(0) scale(0.98);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3), rgba(80, 80, 80, 0.3));
    box-shadow: none;
    transform: none;
}

.submit-button svg {
    width: 14px;
    height: 14px;
}

.submit-button i {
    font-size: 0.75rem;
}

/* Billing charges note */
.billing-charges-note {
    margin-top: 0.85rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);
    border: 1px solid rgba(13, 110, 253, 0.15);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 12px rgba(13, 110, 253, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    color: #fff;
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .billing-charges-note {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.03) 0%, rgba(118, 75, 162, 0.02) 100%);
    border: 1px solid rgba(13, 110, 253, 0.12);
    box-shadow:
        0 4px 12px rgba(13, 110, 253, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: #111;
}

.billing-charges-note::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 70%);
    filter: blur(20px);
    animation: electricWaveFooter 4s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.7;
}

.billing-info-row {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.4;
}

.billing-charges-note svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.currency-disclaimer {
    font-size: 0.75rem;
    opacity: 0.75;
    position: relative;
    z-index: 1;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin-top: 0.25rem;
}

[data-theme="light"] .currency-disclaimer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@keyframes electricWaveFooter {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

/* ==============================================
   18. PAYMENT SUCCESS PAGE
   ============================================== */

/* Center payment success page */
body:has(.payment-success-container) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-attachment: fixed;
}

body:has(.payment-success-container) main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.payment-success-container {
    max-width: 520px;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    color: #fff;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out;
}

[data-theme="light"] .payment-success-container {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="light"] .payment-success-container h1,
[data-theme="light"] .payment-success-container p {
    color: #1a1a1a !important;
}

.payment-success-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.2) 20%, transparent 60%);
    filter: blur(30px);
    animation: electricWave 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

.payment-success-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 110, 253, 0.4) 30%,
        rgba(118, 75, 162, 0.6) 50%,
        rgba(13, 110, 253, 0.4) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(13, 110, 253, 0.6),
        0 0 40px rgba(118, 75, 162, 0.4);
    animation: electricWave 6s ease-in-out infinite;
    pointer-events: none;
}

[data-theme="light"] .payment-success-container::before {
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.12) 20%, transparent 60%);
}

[data-theme="light"] .payment-success-container::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 110, 253, 0.3) 30%,
        rgba(118, 75, 162, 0.4) 50%,
        rgba(13, 110, 253, 0.3) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 15px rgba(13, 110, 253, 0.4),
        0 0 30px rgba(118, 75, 162, 0.3);
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(13, 110, 253, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.1);
    animation: iconPulse 2s ease-in-out infinite;
}

.success-icon svg {
    width: 56px;
    height: 56px;
    stroke: #fff;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: checkDraw 0.6s ease-out 0.3s forwards;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.payment-success-container h1 {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
}

.payment-success-container .lead {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.payment-success-container p {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    margin: 0 0 2rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .payment-success-container .lead {
    color: #2a2a2a;
    text-shadow: none;
}

[data-theme="light"] .payment-success-container p {
    color: #555;
    text-shadow: none;
}

.redirect-progress {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
}

.redirect-progress-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .redirect-progress-label {
    color: #666;
    text-shadow: none;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) inset;
}

[data-theme="light"] .progress-bar-container {
    background: rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0d6efd, #764ba2, #0d6efd);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: progressFill 15s linear forwards, gradientShift 2s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.6);
}

.security-badge {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .security-badge {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    text-shadow: none;
}

.security-badge svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* ==============================================
   19. PAYMENT ERROR PAGE
   ============================================== */

/* Center payment error page */
body:has(.payment-error-container) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-attachment: fixed;
}

body:has(.payment-error-container) main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.payment-error-container {
    max-width: 520px;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 32px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    color: #fff;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out;
}

[data-theme="light"] .payment-error-container {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

[data-theme="light"] .payment-error-container h1,
[data-theme="light"] .payment-error-container p {
    color: #1a1a1a !important;
}

.payment-error-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(220, 53, 69, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(255, 193, 7, 0.18) 20%, transparent 60%);
    filter: blur(30px);
    animation: electricWave 6s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

.payment-error-container::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(220, 53, 69, 0.4) 30%,
        rgba(255, 193, 7, 0.5) 50%,
        rgba(220, 53, 69, 0.4) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(220, 53, 69, 0.5),
        0 0 40px rgba(255, 193, 7, 0.4);
    animation: electricWave 6s ease-in-out infinite;
    pointer-events: none;
}

[data-theme="light"] .payment-error-container::before {
    background:
        radial-gradient(ellipse at center, rgba(220, 53, 69, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(255, 193, 7, 0.1) 20%, transparent 60%);
}

[data-theme="light"] .payment-error-container::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(220, 53, 69, 0.3) 30%,
        rgba(255, 193, 7, 0.35) 50%,
        rgba(220, 53, 69, 0.3) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 15px rgba(220, 53, 69, 0.4),
        0 0 30px rgba(255, 193, 7, 0.3);
}

.error-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #dc3545, #ffc107);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(220, 53, 69, 0.4),
                0 0 0 4px rgba(255, 255, 255, 0.1);
    animation: iconShake 0.6s ease-out;
}

.error-icon svg {
    width: 56px;
    height: 56px;
    stroke: #fff;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    animation: iconFadeIn 0.4s ease-out 0.3s both;
}

.payment-error-container h1 {
    position: relative;
    z-index: 1;
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.payment-error-container p {
    position: relative;
    z-index: 1;
    font-size: 1.05rem;
    margin: 0 0 2.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

[data-theme="light"] .payment-error-container p {
    color: #444;
    text-shadow: none;
}

.action-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary-glass {
    padding: 0.95rem 2rem;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(13, 110, 253, 0.3);
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-primary-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.5);
    color: #fff;
    text-decoration: none;
}

.btn-secondary-glass {
    padding: 0.85rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .btn-secondary-glass {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #333;
    text-shadow: none;
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}

[data-theme="light"] .btn-secondary-glass:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #111;
}

.support-info {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(13, 110, 253, 0.12);
    border: 1px solid rgba(13, 110, 253, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
}

[data-theme="light"] .support-info {
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    text-shadow: none;
}

.support-info svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.divider {
    position: relative;
    z-index: 1;
    margin: 2rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

[data-theme="light"] .divider::before,
[data-theme="light"] .divider::after {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.divider span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

[data-theme="light"] .divider span {
    color: rgba(0, 0, 0, 0.5);
}

/* ==============================================
   20. CHECKOUT LOADING PAGE
   ============================================== */

/* Center checkout loading page */
body:has(#center) {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-attachment: fixed;
}

body:has(#center) main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 420px;
    padding: 0 1.25rem;
}

/* Override for checkout/loading pages that need more width */
#center:has(.chip-glass),
#center:has(.loading-message) {
    max-width: 90vw;
    gap: 2rem;
}

.chip-glass {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    animation: chipFadeIn 0.8s ease-out;
}

[data-theme="light"] .chip-glass {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.chip-glass::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(13, 110, 253, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(118, 75, 162, 0.15) 20%, transparent 60%);
    filter: blur(25px);
    animation: electricWaveFlow 5s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

.security-icon-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.security-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.3), rgba(118, 75, 162, 0.3));
    border-radius: 50%;
    animation: glowPulse 3s ease-in-out infinite;
    box-shadow:
        0 0 40px rgba(13, 110, 253, 0.6),
        0 0 80px rgba(118, 75, 162, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .security-icon-bg {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.4), rgba(118, 75, 162, 0.4));
    box-shadow:
        0 0 40px rgba(13, 110, 253, 0.4),
        0 0 80px rgba(118, 75, 162, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(13, 110, 253, 0.6);
    border-right-color: rgba(118, 75, 162, 0.6);
    animation: rotate 8s linear infinite;
}

.orbital-ring:nth-child(2) {
    width: 160px;
    height: 160px;
    animation: rotate 8s linear infinite;
}

.orbital-ring:nth-child(3) {
    width: 180px;
    height: 180px;
    animation: rotate 12s linear infinite reverse;
    border-top-color: rgba(118, 75, 162, 0.4);
    border-right-color: rgba(13, 110, 253, 0.4);
}

.security-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 70px;
    height: 70px;
    color: #fff;
    filter: drop-shadow(0 4px 20px rgba(13, 110, 253, 0.8));
}

[data-theme="light"] .security-icon {
    color: #0d6efd;
    filter: drop-shadow(0 4px 20px rgba(13, 110, 253, 0.6));
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #0d6efd, #764ba2);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 4s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(13, 110, 253, 0.8);
}

.particle:nth-child(4) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.particle:nth-child(5) {
    top: 70%;
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(6) {
    top: 30%;
    right: 15%;
    animation-delay: 2s;
}

.particle:nth-child(7) {
    bottom: 25%;
    right: 20%;
    animation-delay: 3s;
}

.loading-message {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 1.75rem 2.5rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #fff;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    animation: messageFadeIn 0.8s ease-out 0.3s both;
}

[data-theme="light"] .loading-message {
    background: rgba(255, 255, 255, 0.75);
    color: #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.loading-message::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 110, 253, 0.8) 30%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(118, 75, 162, 0.8) 70%,
        transparent 100%
    );
    box-shadow:
        0 0 20px rgba(13, 110, 253, 0.7),
        0 0 35px rgba(118, 75, 162, 0.5);
    animation: electricLineFlow 2.5s ease-in-out infinite;
    pointer-events: none;
}

.loading-message h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    color: #fff;
    position: relative;
    z-index: 1;
}

[data-theme="light"] .loading-message h1 {
    color: #111;
}

.loading-message p {
    font-size: 1.05rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    position: relative;
    z-index: 1;
}

[data-theme="light"] .loading-message p {
    color: #555;
}

@media (max-width: 576px) {
    .loading-message {
        padding: 1.5rem 2rem;
        max-width: 90vw;
    }

    .loading-message h1 {
        font-size: 1.5rem;
    }

    .loading-message p {
        font-size: 0.95rem;
    }

    .chip-glass {
        padding: 1.5rem;
    }

    .microchip {
        width: 100px;
        height: 100px;
    }
}

/* ==============================================
   21. ADDITIONAL ANIMATIONS FOR NEW SECTIONS
   ============================================== */

@keyframes gradientPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes electricWaveHover {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes electricLineFlow {
    0% {
        left: -100%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes electricWaveFooter {
    0% {
        left: -50%;
    }
    100% {
        left: 100%;
    }
}

@keyframes electricWaveFlow {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes electricWave {
    0% {
        left: -100%;
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(13, 110, 253, 0.4),
                    0 0 0 4px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(13, 110, 253, 0.6),
                    0 0 0 6px rgba(255, 255, 255, 0.15);
    }
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
    100% {
        background-position: 0% 0%;
    }
}

@keyframes iconShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px) rotate(-2deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px) rotate(2deg);
    }
}

@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 40px rgba(13, 110, 253, 0.6),
            0 0 80px rgba(118, 75, 162, 0.4),
            inset 0 0 30px rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow:
            0 0 60px rgba(13, 110, 253, 0.8),
            0 0 120px rgba(118, 75, 162, 0.6),
            inset 0 0 40px rgba(255, 255, 255, 0.15);
    }
}

@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-20px) scale(1.2);
    }
}

@keyframes chipFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes messageFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==============================================
   22. JAVASCRIPT REQUIREMENT WARNING (NOSCRIPT)
   ============================================== */

.noscript-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: noscriptFadeIn 0.6s ease-out;
}

.noscript-card {
    max-width: 560px;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    animation: noscriptScaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.noscript-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    position: relative;
    animation: noscriptIconFloat 3s ease-in-out infinite;
}

.noscript-icon-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    animation: noscriptIconPulse 2s ease-in-out infinite;
    box-shadow:
        0 0 32px rgba(37, 99, 235, 0.25),
        0 0 64px rgba(37, 99, 235, 0.18);
}

.noscript-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    z-index: 2;
}

.noscript-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    line-height: 1.2;
}

.noscript-description {
    font-size: 16px;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 32px;
}

.noscript-description strong {
    color: #2563eb;
    font-weight: 600;
}

.noscript-instructions {
    background: rgba(37, 99, 235, 0.06);
    border: 2px solid rgba(37, 99, 235, 0.16);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    margin-bottom: 24px;
}

.noscript-instructions-title {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.noscript-instructions-title::before {
    content: "💡";
    font-size: 18px;
}

.noscript-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.noscript-steps li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.5;
    counter-increment: step-counter;
}

.noscript-steps li:last-child {
    margin-bottom: 0;
}

.noscript-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.noscript-browser-help {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: left;
}

.noscript-browser-help-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f766e;
    margin: 0 0 8px;
}

.noscript-browser-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}

.noscript-browser-link {
    color: #0f766e;
    text-decoration: none;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.noscript-browser-link:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #0f766e;
}

.noscript-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* Animations */
@keyframes noscriptFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes noscriptSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes noscriptScaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes noscriptIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes noscriptIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 32px rgba(59, 130, 246, 0.35),
            0 0 64px rgba(37, 99, 235, 0.22);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 0 48px rgba(59, 130, 246, 0.45),
            0 0 80px rgba(37, 99, 235, 0.28);
    }
}

@keyframes noscriptPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .noscript-banner {
        padding: 12px 16px;
    }

    .noscript-banner-icon {
        font-size: 20px;
        margin-right: 6px;
    }

    .noscript-banner-text {
        font-size: 13px;
    }

    .noscript-card {
        padding: 28px 24px;
    }

    .noscript-icon-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .noscript-icon {
        font-size: 40px;
    }

    .noscript-title {
        font-size: 22px;
    }

    .noscript-description {
        font-size: 14px;
    }

    .noscript-instructions {
        padding: 20px 16px;
    }

    .noscript-steps li {
        padding-left: 36px;
        font-size: 13px;
    }

    .noscript-steps li::before {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* ==============================================
   END OF FILE
   ============================================== */
