/* ============================================
   Free IPTV 24h — Design System
   Arabic RTL, Dark Mode, Modern Premium UI
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.4);

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-bg: linear-gradient(180deg, #0a0e1a 0%, #111827 50%, #0f172a 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));

    --border-color: rgba(99, 102, 241, 0.15);
    --border-glow: rgba(99, 102, 241, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);

    --font-ar: 'Cairo', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
svg {
    vertical-align: middle;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Animated Background === */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-particles::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.bg-particles::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }

    75% {
        transform: translate(40px, 20px) scale(1.05);
    }
}

/* === Navigation === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* === Hero Section === */
.hero {
    position: relative;
    z-index: 1;
    padding: 160px 0 100px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-light);
    margin-bottom: 24px;
    animation: fadeInDown 0.6s ease-out;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.8;
    animation: fadeInUp 1s ease-out;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
    animation: fadeInUp 1.2s ease-out;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    animation: fadeInUp 1.4s ease-out;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-ar);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 4px 40px rgba(99, 102, 241, 0.6), 0 0 60px rgba(139, 92, 246, 0.3);
    }
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* === Features === */
.features {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 56px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-icon svg {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* === How It Works === */
.how-it-works {
    position: relative;
    z-index: 1;
    padding: 100px 0;
    background: rgba(99, 102, 241, 0.03);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 240px;
}

.step-number {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-primary);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    box-shadow: var(--shadow-glow);
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.step-arrow {
    transform: scaleX(-1);
    /* RTL flip */
}

.steps-cta {
    text-align: center;
}

/* === Credentials Section === */
.credentials-section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.credentials-card {
    background: var(--bg-card);
    border: 2px solid var(--success);
    border-radius: var(--radius-xl);
    padding: 48px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 40px var(--success-glow);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.credentials-header {
    text-align: center;
    margin-bottom: 32px;
}

.success-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 12px;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.credentials-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.credentials-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Timer bar */
.timer-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.timer-icon {
    font-size: 1.5rem;
}

.timer-text {
    font-weight: 600;
    font-size: 1rem;
}

.countdown {
    color: var(--success);
    font-weight: 800;
    font-family: 'Cairo', monospace;
    font-size: 1.2rem;
    direction: ltr;
    display: inline-block;
}

.timer-progress {
    flex: 1;
    min-width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 1s linear;
    width: 100%;
}

/* Credential items */
.cred-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.cred-full {
    grid-column: 1 / -1;
}

.cred-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.cred-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.cred-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cred-value span {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-light);
    word-break: break-all;
    direction: ltr;
    text-align: left;
}

.cred-url {
    font-size: 0.85rem !important;
}

.copy-btn {
    padding: 6px 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-ar);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-width: 50px;
}

.copy-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success);
}

/* Setup instructions */
.setup-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.setup-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.setup-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.setup-tab {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-ar);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.setup-tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.setup-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.setup-content {
    color: var(--text-secondary);
    line-height: 2;
}

.setup-content ol {
    padding-right: 20px;
}

.setup-content li {
    margin-bottom: 8px;
}

.setup-content code {
    background: rgba(99, 102, 241, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent-light);
    font-size: 0.85rem;
    direction: ltr;
    display: inline-block;
}

.setup-content ul {
    list-style: none;
    padding-right: 16px;
    margin-top: 8px;
}

.setup-content ul li::before {
    content: '•';
    color: var(--accent);
    margin-left: 8px;
}

/* Renew notice */
.renew-notice {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.renew-notice p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* === FAQ === */
.faq {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--accent);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    font-weight: 700;
    font-size: 1.05rem;
}

.faq-arrow {
    transition: var(--transition);
    flex-shrink: 0;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 18px;
}

/* === Footer === */
.footer {
    position: relative;
    z-index: 1;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand-col .logo {
    text-decoration: none;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.footer-links-col h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-col ul li {
    margin-bottom: 10px;
}

.footer-links-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links-col ul li a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* === Legal Pages === */
.legal-page {
    padding: 120px 0 60px;
    min-height: 80vh;
}

.legal-header {
    text-align: center;
    margin-bottom: 48px;
}

.legal-header h1 {
    font-size: 2.4rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.legal-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 36px;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.legal-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul {
    padding-right: 20px;
    margin: 12px 0;
}

.legal-section ul li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 6px;
}

.legal-section a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.legal-section a:hover {
    border-bottom-color: var(--accent-light);
}

/* DMCA Steps */
.dmca-requirements {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.dmca-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.dmca-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.dmca-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.dmca-item p {
    font-size: 0.85rem;
    margin: 0 !important;
}

.contact-card {
    padding: 20px;
    background: var(--gradient-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item a {
    color: var(--accent-light);
    font-size: 1.05rem;
    font-weight: 600;
}

/* === User Dashboard === */
.dashboard {
    display: none;
    padding: 100px 0 60px;
}

.dashboard.active {
    display: block;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.dashboard-welcome h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.dash-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dash-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dash-card-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dash-stat {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dash-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.dash-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dash-status.expired {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dash-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.dash-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}


/* === Loading Overlay === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    text-align: center;
}

.loader-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: var(--success);
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Tier Compare Badges === */
.tier-compare {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 36px;
    animation: fadeInUp 1.3s ease-out;
}

.tier-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
}

.tier-guest {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.tier-registered {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent-light);
}

.tier-badge strong {
    font-size: 1.1rem;
    font-weight: 800;
}

.tier-vs {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

/* === Nav Auth === */
.nav-auth,
.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-light);
}

/* === Auth Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-ar);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    direction: ltr;
    text-align: left;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
}

.input-group input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.form-error {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.modal-switch {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-switch a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 700;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* === Ad Gate Modal === */
.ad-gate-card {
    max-width: 520px;
}

.ad-gate-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.ad-gate-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.ad-step-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition);
}

.ad-step-card.active {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.ad-step-card.done {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.08);
}

.ad-step-card.locked {
    opacity: 0.5;
}

.ad-step-num {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
}

.ad-step-card.active .ad-step-num {
    background: var(--gradient-primary);
    border-color: var(--accent);
    color: white;
}

.ad-step-card.done .ad-step-num {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.ad-step-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ad-step-info strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.ad-step-status {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ad-step-card.active .ad-step-status {
    color: var(--accent-light);
}

.ad-step-card.done .ad-step-status {
    color: var(--success);
}

.ad-step-btn {
    white-space: nowrap;
    font-size: 0.85rem !important;
    padding: 8px 16px !important;
}


/* === Responsive === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg) scaleX(-1);
    }

    .credentials-card {
        padding: 24px;
    }

    .cred-grid {
        grid-template-columns: 1fr;
    }

    .timer-bar {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .setup-tabs {
        flex-direction: column;
    }
}