/*
 * Q1KEY Homepage - Modern UI Design
 * New design from scratch - 2024
 */

/* ============================================== */
/*                CSS VARIABLES                   */
/* ============================================== */
:root {
    /* Colors - matching project identity */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);

    --secondary: #8b5cf6;
    --accent: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Background */
    --bg-dark: #1c2135;
    --bg-darker: #131726;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(255, 255, 255, 0.05);

    /* Text */
    --text-white: #ffffff;
    --text-light: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dark: #64748b;

    /* Border */
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);

    /* Spacing */
    --header-height: 72px;
    --container-max: 1200px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Typography */
    --font-ar: 'Cairo', system-ui, sans-serif;
    --font-en: 'Inter', system-ui, sans-serif;

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--primary-glow);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
}

/* ============================================== */
/*                  BASE RESET                    */
/* ============================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-ar);
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Allow text selection for copying but keep default cursor for aesthetics */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: default;
}

/* Cursor handling for inputs */
input,
textarea,
[contenteditable="true"] {
    cursor: text;
}

[lang="en"] body,
[dir="ltr"] body {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* SVG Sizing - Prevent oversized icons */
svg {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* ============================================== */
/*                   HEADER                       */
/* ============================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(28, 33, 53, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-white);
    background: var(--bg-card);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-lang {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-lang:hover {
    color: var(--text-white);
    border-color: var(--primary);
}

/* Buttons */
.btn-outline {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-glow);
}

.btn-primary {
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius);
    color: var(--text-white);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

.btn-primary.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-primary.btn-full {
    width: 100%;
}

.btn-ghost {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================== */
/*                 HERO SECTION                   */
/* ============================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 2rem) 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 15s ease-in-out infinite;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -20%;
    right: -10%;
    opacity: 0.15;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -20%;
    left: -10%;
    opacity: 0.1;
    animation-delay: -7s;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 30px) scale(1.1);
    }
}

.hero-container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hero-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================== */
/*               SECTION STYLES                   */
/* ============================================== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.75rem;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================== */
/*              FEATURES SECTION                  */
/* ============================================== */
.features {
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.02) 50%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 1.75rem;
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================== */
/*               PLANS SECTION                    */
/* ============================================== */
.plans {
    background: var(--bg-darker);
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.plan-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.plan-card.popular {
    border: 2px solid var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    color: var(--text-white);
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.plan-duration {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.plan-price .currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.plan-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.85rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}

.plan-card:not(.popular) .plan-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-light);
}

.plan-card:not(.popular) .plan-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.plan-card.popular .plan-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
}

.plan-card.popular .plan-btn:hover {
    box-shadow: var(--shadow-glow);
}

/* ============================================== */
/*               ABOUT SECTION                    */
/* ============================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content .section-tag {
    margin-bottom: 0.75rem;
}

.about-content .section-title {
    text-align: start;
    margin-bottom: 1rem;
}

.about-text {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.about-feature-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent);
    border-radius: 50%;
    font-size: 0.75rem;
}

/* Dashboard Mockup */
.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-logo-img {
    max-width: 350px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(99, 102, 241, 0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.about-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-card-header {
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border);
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dark);
}

.dots span:first-child {
    background: #ef4444;
}

.dots span:nth-child(2) {
    background: #f59e0b;
}

.dots span:last-child {
    background: #10b981;
}

.about-card-body {
    padding: 1.5rem;
}

.mock-chart {
    height: 120px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.3) 0%, transparent 100%);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.mock-stats {
    display: flex;
    gap: 0.75rem;
}

.mock-stat {
    flex: 1;
    height: 60px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

/* ============================================== */
/*             CONTACT SECTION                    */
/* ============================================== */
.contact {
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.02) 100%);
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius);
    font-size: 1.5rem;
}

.contact-info h4 {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================== */
/*                  FOOTER                        */
/* ============================================== */
.footer {
    background: var(--bg-darker);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    margin-bottom: 0.75rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-dark);
    font-size: 0.85rem;
}

/* ============================================== */
/*                  MODALS                        */
/* ============================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #1c2135;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-lg {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

[dir="ltr"] .modal-close {
    left: auto;
    right: 1rem;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius);
    color: var(--primary-light);
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-icon-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.1));
    color: var(--accent);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.modal-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: none;
}

.modal-error.visible {
    display: block;
}

/* ============================================== */
/*                   FORMS                        */
/* ============================================== */
.form-section {
    margin-bottom: 1.5rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* جعل علامة النجمة (*) حمراء للحقول الإلزامية */
.required-star {
    color: #ef4444;
    font-weight: 700;
    margin-right: 2px;
}

[dir="ltr"] .required-star {
    margin-right: 0;
    margin-left: 2px;
}

/* إذا كان النص يحتوي على * في النهاية، يتم تلوينها بالأحمر */
.form-section label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper svg {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-dark);
    pointer-events: none;
}

[dir="ltr"] .input-wrapper svg {
    right: auto;
    left: 1rem;
}

.input-wrapper input {
    padding-right: 2.75rem;
}

[dir="ltr"] .input-wrapper input {
    padding-right: 1rem;
    padding-left: 2.75rem;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-white);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-dark);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.toggle-password {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dark);
    padding: 0.5rem;
    pointer-events: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary-light);
}

/* Password wrapper for toggle button positioning */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-left: 2.5rem;
}

[dir="ltr"] .password-wrapper input {
    padding-left: 1rem;
    padding-right: 2.5rem;
}

[dir="ltr"] .toggle-password {
    left: auto;
    right: 1rem;
}

.toggle-password svg {
    position: static;
    transform: none;
    pointer-events: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Plan Selector */
.plan-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.plan-option {
    flex: 1;
    min-width: 100px;
    padding: 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.plan-option:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.plan-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.plan-option input {
    display: none;
}

.plan-option-duration {
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.plan-option-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
}

/* Spinner */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-primary.loading .spinner {
    display: block;
}

.btn-primary.loading span {
    display: none;
}

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

/* Success View */
.success-view {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    color: var(--accent);
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.success-view h2 {
    font-size: 1.5rem;
    color: var(--text-white);
    margin-bottom: 1rem;
}

.success-view p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Request Info Box */
.request-info-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.request-number,
.request-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.request-number {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.request-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.request-value {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Request Instructions */
.request-instructions {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: right;
}

[dir="ltr"] .request-instructions {
    text-align: left;
}

.instructions-title {
    color: var(--warning);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.instructions-list {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.8;
    padding-right: 1.25rem;
    margin: 0;
}

[dir="ltr"] .instructions-list {
    padding-right: 0;
    padding-left: 1.25rem;
}

.instructions-list li {
    margin-bottom: 0.5rem;
}

/* Success Actions */
.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* WhatsApp Button */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #25D366;
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
}

/* ============================================== */
/*           EXPIRED SUBSCRIPTION STYLES          */
/* ============================================== */
.sidebar-nav-item.expired {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(1);
    position: relative;
}

.sidebar-nav-item.expired::after {
    content: '🔒';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
}

[dir="ltr"] .sidebar-nav-item.expired::after {
    left: auto;
    right: 1rem;
}

.sidebar-nav-item.expired-exception {
    opacity: 1 !important;
    pointer-events: auto !important;
    filter: none !important;
}

.sidebar-nav-item.expired-exception::after {
    display: none !important;
}

/* ============================================== */
/*              RESPONSIVE DESIGN                 */
/* ============================================== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-content .section-tag {
        display: block;
        text-align: center;
    }

    .about-text {
        text-align: center;
    }

    .about-features {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .header-actions .btn-outline,
    .header-actions .btn-primary {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }

    .hero-stat {
        min-width: 100px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary.btn-lg {
        width: 100%;
    }

    .plan-selector {
        flex-direction: column;
    }

    .modal {
        padding: 1.5rem;
    }
}

/* ============================================== */
/*               SCROLLBAR                        */
/* ============================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Hide browser default password reveal button */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}