/* EasySub Website - Global Design System */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-gradient-hover: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-display: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', 'Consolas', monospace;
    --nav-height: 72px;
    --section-gap: 120px;
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --navbar-scrolled-bg: rgba(10, 10, 15, 0.85);
    --mobile-overlay-bg: rgba(10, 10, 15, 0.95);
}

/* ========== LIGHT MODE ========== */
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.04);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    --text-primary: #1a1a2e;
    --text-secondary: rgba(26, 26, 46, 0.7);
    --text-muted: rgba(26, 26, 46, 0.45);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.1);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --navbar-scrolled-bg: rgba(255, 255, 255, 0.9);
    --mobile-overlay-bg: rgba(248, 249, 252, 0.98);
}

[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse 80% 60% at 10% 10%, rgba(99, 102, 241, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 90%, rgba(139, 92, 246, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(168, 85, 247, 0.02) 0%, transparent 70%);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-mobile-overlay {
    background: var(--mobile-overlay-bg);
}

[data-theme="light"] .nav-hamburger span {
    background: var(--text-primary);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card {
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .form-input {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-input:focus {
    background: #ffffff;
}

[data-theme="light"] .lang-toggle {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .lang-toggle button {
    color: var(--text-muted);
}

[data-theme="light"] .lang-toggle button.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

[data-theme="light"] .hero-mockup {
    background: var(--bg-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .mockup-block {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .footer {
    background: #f0f1f5;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Ambient background gradients */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 10%, rgba(99, 102, 241, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 90% 90%, rgba(139, 92, 246, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(168, 85, 247, 0.02) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }

img { max-width: 100%; display: block; }

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { color: var(--text-secondary); line-height: 1.7; }
p.large { font-size: 1.125rem; }

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premiere-pro-text {
    color: #8989e7;
}

.mono { font-family: var(--font-mono); }

/* ========== LAYOUT ========== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 600px; margin: 0 auto; font-size: 1.1rem; }

/* Grid system */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    :root { --section-gap: 80px; }
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--transition-smooth), border-color var(--transition-smooth), backdrop-filter var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo-icon {
    width: 108px;
    height: 108px;
    background-image: url('../assets/symbol_logo_dark_mode.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-logo-text {
    height: 72px;
    width: 300px;
    background-image: url('../assets/Text_logo_dark_mode.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center left;
}

/* Light mode logo variants - same sizes */
[data-theme="light"] .nav-logo-icon {
    width: 108px;
    height: 108px;
    background-image: url('../assets/symbol_logo_bright_mode.png');
}

[data-theme="light"] .nav-logo-text {
    height: 72px;
    width: 300px;
    background-image: url('../assets/Text_logo_bright_mode.png');
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4), inset 0 0 12px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 4px;
    gap: 2px;
}

.lang-toggle button {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-toggle button.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translateY(5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translateY(-5px); }

.nav-mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.nav-mobile-overlay.open { display: flex; }

.nav-mobile-overlay a {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-mobile-overlay a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

#navUserMenu .btn.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4), inset 0 0 12px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-right .btn { display: none; }
    .nav-right { gap: 8px; }
    .nav-right .lang-toggle { display: flex; }
    .nav-right .lang-toggle button { padding: 4px 8px; font-size: 0.7rem; }
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }

.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 18px; font-size: 0.8rem; }

.btn-icon {
    width: 40px; height: 40px; padding: 0;
    border-radius: var(--radius-sm);
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.card:hover::before { opacity: 1; }

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--accent-primary);
}

.card h3 { margin-bottom: 10px; font-size: 1.15rem; }
.card p { font-size: 0.95rem; }

/* Glass card variant */
.card-glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border-color: var(--glass-border);
}

/* ========== FORM ELEMENTS ========== */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.form-input.error { border-color: var(--error); }

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 6px;
    display: none;
}

.form-error.visible { display: block; }

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.password-toggle:hover { color: var(--text-primary); }

/* RTL password toggle */
body.rtl .password-wrapper .form-input {
    padding-right: 16px;
    padding-left: 44px;
}

body.rtl .password-toggle {
    right: auto;
    left: 12px;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input { display: none; }

.toggle-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: background var(--transition-fast);
}

.toggle input:checked + .toggle-track {
    background: var(--accent-primary);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle input:checked ~ .toggle-thumb {
    transform: translateX(20px);
}

/* RTL Toggle Support */
body.rtl .toggle-thumb {
    left: auto;
    right: 2px;
}

body.rtl .toggle input:checked ~ .toggle-thumb {
    transform: translateX(-20px);
}

/* ========== BADGES & TAGS ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border-color: rgba(245, 158, 11, 0.2); }

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-spring);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-close {
    width: 32px; height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 64px 0 32px;
    margin-top: var(--section-gap);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 0.9rem;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition-fast);
    text-decoration: none;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ========== ANIMATIONS ========== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Enhanced floating for orbs - moving backlight effect */
@keyframes orb-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, 10px) scale(0.95);
        opacity: 0.35;
    }
    75% {
        transform: translate(15px, 25px) scale(1.05);
        opacity: 0.45;
    }
}

/* Floating logo animation */
@keyframes logo-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(3deg);
    }
    50% {
        transform: translateY(-5px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Loading spinner */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent-primary); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.relative { position: relative; }
.w-full { width: 100%; }

/* ========== RTL SUPPORT ========== */
body.rtl { direction: rtl; text-align: right; }

/* RTL: direction:rtl on body handles all flex container reversals automatically.
   No need for flex-direction: row-reverse as that would double-reverse back to LTR. */

body.rtl .card-icon { margin-left: auto; margin-right: 0; }

@media (max-width: 768px) {
    body.rtl .footer-bottom { flex-direction: column; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ========== PAGE CONTENT OFFSET ========== */
.page-content { padding-top: var(--nav-height); }

/* ========== USER BAR (authenticated pages) ========== */
.user-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}

.user-bar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 36px; height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.user-name { font-weight: 600; font-size: 0.9rem; }

.user-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--success);
}

.user-balance.low { color: var(--warning); }
.user-balance.empty { color: var(--error); }

/* ========== OTP INPUT ========== */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
}

.otp-input {
    width: 48px; height: 56px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination-nav-btn {
    font-family: var(--font-display);
    font-size: 0.85rem;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.pagination-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-nav-btn svg {
    flex-shrink: 0;
}

/* Page Numbers Container */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-num-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.page-num-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    cursor: default;
}

.page-ellipsis {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pagination .page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0 12px;
}

/* RTL Pagination Support */
body.rtl .pagination {
    flex-direction: row-reverse !important;
}

body.rtl .page-numbers {
    flex-direction: row-reverse !important;
}

body.rtl .pagination-nav-btn {
    flex-direction: row-reverse;
}

body.rtl .pagination-arrow-prev,
body.rtl .pagination-arrow-next {
    display: none !important;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 100px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ========== ALERT/TOAST ========== */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

/* ========== FILE DROP ZONE ========== */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.drop-zone-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.drop-zone-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ========== COMPREHENSIVE MOBILE STYLES ========== */
@media (max-width: 768px) {
    /* Base spacing adjustments */
    .container { padding: 0 16px; }
    .section { padding: 48px 0; }

    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.15rem; }

    /* Navbar mobile adjustments */
    .navbar > .container { padding: 0 16px; }
    .nav-logo-text { height: 56px; width: 240px; }
    .nav-logo-icon { width: 84px; height: 84px; }

    /* Mobile overlay improvements */
    .nav-mobile-overlay {
        padding: 100px 24px 32px;
        gap: 4px;
    }
    .nav-mobile-overlay a {
        font-size: 1.2rem;
        padding: 14px 20px;
    }
    .nav-mobile-overlay .lang-toggle {
        display: flex;
        margin-top: 20px;
    }

    /* User bar mobile */
    .user-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    .user-bar-info { justify-content: center; }
    .user-bar > div:last-child {
        justify-content: center;
    }

    /* Buttons */
    .btn { padding: 10px 18px; font-size: 0.85rem; }
    .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
    .btn-sm { padding: 6px 12px; font-size: 0.78rem; }

    /* Modal mobile */
    .modal-overlay { padding: 16px; }
    .modal {
        padding: 24px 20px;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }
    .modal-header { margin-bottom: 20px; }
    .modal-header h3 { font-size: 1.1rem; }

    /* Form inputs */
    .form-input { padding: 12px 14px; font-size: 0.9rem; }

    /* OTP inputs */
    .otp-inputs { gap: 8px; }
    .otp-input {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
    }

    /* Pagination */
    .pagination { gap: 4px; flex-wrap: wrap; }
    .pagination-nav-btn { padding: 6px 10px; font-size: 0.75rem; }
    .pagination .page-info { font-size: 0.8rem; padding: 0 8px; }
    .page-numbers { gap: 2px; }
    .page-num-btn { min-width: 30px; height: 30px; font-size: 0.75rem; }
    .page-ellipsis { min-width: 24px; height: 30px; font-size: 0.75rem; }

    /* Drop zone */
    .drop-zone { padding: 32px 20px; }
    .drop-zone-icon { font-size: 2rem; }
    .drop-zone-text { font-size: 0.9rem; }

    /* Utilities */
    .text-center { text-align: center; }
    .mt-24 { margin-top: 20px; }
    .mt-32 { margin-top: 24px; }
    .gap-24 { gap: 16px; }
    .gap-32 { gap: 20px; }
}

@media (max-width: 480px) {
    /* Extra small screens */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }

    .container { padding: 0 12px; }

    .btn { padding: 10px 14px; }

    .otp-inputs { gap: 6px; }
    .otp-input {
        width: 38px;
        height: 46px;
        font-size: 1.2rem;
    }

    .modal { padding: 20px 16px; }

    .user-bar { padding: 14px 12px; }
}

/* ========== THEME TOGGLE BUTTON ========== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
    display: block;
}

.theme-toggle .icon-moon {
    display: none;
}

/* Moon icon (shown in light mode) */
[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-banner-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.cookie-banner-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Light mode */
[data-theme="light"] .cookie-banner {
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* RTL Support */
body.rtl .cookie-banner-content {
    direction: rtl;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .cookie-banner-text h4 {
        font-size: 0.95rem;
    }

    .cookie-banner-text p {
        font-size: 0.8rem;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-banner-actions .btn {
        flex: 1;
        max-width: 150px;
    }
}

/* ========== WHATSAPP FLOATING BUTTON ========== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    color: white;
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
}

/* RTL - move to left side */
body.rtl .whatsapp-float {
    right: auto;
    left: 24px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }

    body.rtl .whatsapp-float {
        right: auto;
        left: 16px;
    }
}
