:root {
    --bg-primary: #0b0b0b;
    --bg-secondary: rgba(23, 23, 23, 0.85);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    
    --color-text: #f5f5f5;
    --color-text-muted: #a6a6a6;
    
    /* Pornhub Accents (Orange & Dark Gray) */
    --accent-primary: #ff9900;
    --accent-primary-glow: rgba(255, 153, 0, 0.35);
    --accent-secondary: #ffa31a;
    --accent-secondary-glow: rgba(255, 163, 26, 0.25);
    --accent-pink: #ff7b00;
    --accent-success: #00ff87;
    --accent-error: #ff4365;

    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Poppins', sans-serif;
}

/* Reset and Core Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--color-text);
    font-family: var(--font-arabic);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Animated Background Glows */
.bg-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #1c1c1c 0%, #0c0c0c 100%);
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-primary-glow) 0%, transparent 70%);
    filter: blur(40px);
    animation: float 20s infinite ease-in-out;
    opacity: 0.6;
}

.bubble:nth-child(1) { width: 400px; height: 400px; top: -100px; left: -100px; animation-duration: 25s; }
.bubble:nth-child(2) { width: 500px; height: 500px; bottom: -150px; right: -150px; animation-duration: 30s; --accent-primary-glow: var(--accent-secondary-glow); }
.bubble:nth-child(3) { width: 300px; height: 300px; top: 40%; left: 70%; animation-duration: 18s; }
.bubble:nth-child(4) { width: 350px; height: 350px; bottom: 30%; left: 15%; animation-duration: 22s; --accent-primary-glow: rgba(255, 0, 127, 0.15); }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-50px) scale(1.1) rotate(180deg); }
}

/* Container Layout */
.container {
    position: relative;
    width: 100%;
    max-width: 900px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 35px;
    z-index: 1;
}

/* Header Styling */
.app-header {
    text-align: center;
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px var(--accent-primary-glow));
    margin-bottom: 5px;
}

.logo-icon i {
    animation: bounce 3s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, #d8c3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

/* Downloader Card - Glassmorphism */
.downloader-card {
    width: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                inset 0 1px 0 var(--glass-highlight);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.downloader-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary), var(--accent-pink));
}

/* Input Section styling */
.input-section {
    width: 100%;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(10, 5, 20, 0.6);
    border: 1.5px solid var(--glass-border);
    border-radius: 16px;
    padding: 8px 8px 8px 16px;
    transition: all 0.3s ease;
    gap: 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary-glow),
                inset 0 2px 4px rgba(0,0,0,0.5);
}

.input-icon {
    font-size: 1.3rem;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 5px var(--accent-primary-glow));
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text);
    font-family: var(--font-arabic);
    font-size: 1.05rem;
    padding: 10px 0;
}

.input-wrapper input::placeholder {
    color: rgba(181, 169, 223, 0.45);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #d87d00 100%);
    color: #000000;
    border: none;
    outline: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: var(--font-arabic);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(255, 153, 0, 0.25);
}

.btn-primary:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.45);
    background: linear-gradient(135deg, #ffa31a 0%, var(--accent-primary) 100%);
}

.btn-primary:active {
    transform: scale(0.98) translateY(0);
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(-4px); /* Moves left since layout is RTL */
}

/* Loader Styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border-top-color: var(--accent-secondary);
    border-bottom-color: var(--accent-primary);
    animation: spin 1.2s linear infinite;
    filter: drop-shadow(0 0 10px var(--accent-primary-glow));
}

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

.loader-container p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Error Alert Box */
.error-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 67, 101, 0.08);
    border: 1px solid var(--accent-error);
    border-radius: 16px;
    padding: 20px;
    margin-top: 25px;
    animation: fadeIn 0.4s ease forwards;
}

.error-icon {
    font-size: 1.8rem;
    color: var(--accent-error);
    filter: drop-shadow(0 0 8px rgba(255, 67, 101, 0.4));
}

.error-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffb3c1;
    margin-bottom: 4px;
}

.error-details p {
    color: #ffd6df;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Result Section Styles */
.result-container {
    margin-top: 30px;
    animation: slideUp 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.video-preview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
}

.thumbnail-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    left: 10px; /* Positioned left for RTL standard or visual check */
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-english);
    direction: ltr;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.platform-badge {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-transform: capitalize;
}

/* Platform Specific Badges */
.platform-badge.pornhub { background: linear-gradient(135deg, #ffa31a, #ff7b00); color: #000; }
.platform-badge.pornhub i { color: #000; }
.platform-badge.youtube { background: linear-gradient(135deg, #e52d27, #b31217); }
.platform-badge.tiktok { background: linear-gradient(135deg, #00f2fe, #4facfe); color: #000; }
.platform-badge.tiktok i { color: #000; }
.platform-badge.instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.platform-badge.facebook { background: linear-gradient(135deg, #1877f2, #3b5998); }
.platform-badge.twitter { background: linear-gradient(135deg, #1da1f2, #0e71a8); }
.platform-badge.unknown { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); }

.video-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.5;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Formats section styling */
.formats-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.formats-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.formats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-left: 5px; /* for scrollbar spacing */
}

.format-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 16px;
    transition: all 0.25s ease;
}

.format-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(143, 67, 255, 0.4);
    transform: translateX(-4px); /* Micro-interaction moving slightly left on hover in RTL */
}

.format-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-badge {
    background: rgba(143, 67, 255, 0.2);
    border: 1px solid var(--accent-primary);
    color: #dcbfff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-english);
}

.format-info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.format-ext {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: #fff;
    font-family: var(--font-english);
}

.format-details {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.btn-download {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px 18px;
    cursor: pointer;
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-download:hover {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 135, 0.4);
}

.btn-download.downloading {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: #fff !important;
    cursor: not-allowed;
}

/* Platforms list at footer */
.platforms-section {
    text-align: center;
    margin-top: 10px;
}

.platforms-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.platforms-section h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.platforms-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.platform-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.platform-item i {
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.platform-item span {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Platforms Hover Effects */
.platform-item.pornhub:hover { border-color: #ffa31a; background: rgba(255, 163, 26, 0.05); }
.platform-item.pornhub:hover i { color: #ffa31a; transform: scale(1.15); }

.platform-item.youtube:hover { border-color: #ff0000; background: rgba(255, 0, 0, 0.05); }
.platform-item.youtube:hover i { color: #ff0000; transform: scale(1.15); }

.platform-item.tiktok:hover { border-color: #00f2fe; background: rgba(0, 242, 254, 0.05); }
.platform-item.tiktok:hover i { color: #00f2fe; transform: scale(1.15); }

.platform-item.instagram:hover { border-color: #e1306c; background: rgba(225, 48, 108, 0.05); }
.platform-item.instagram:hover i { color: #e1306c; transform: scale(1.15); }

.platform-item.facebook:hover { border-color: #1877f2; background: rgba(24, 119, 242, 0.05); }
.platform-item.facebook:hover i { color: #1877f2; transform: scale(1.15); }

.platform-item.twitter:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.05); }
.platform-item.twitter:hover i { color: #ffffff; transform: scale(1.15); }

.platform-item.web:hover { border-color: var(--accent-secondary); background: rgba(0, 242, 254, 0.05); }
.platform-item.web:hover i { color: var(--accent-secondary); transform: scale(1.15); }

/* Footer Copyright */
.app-footer {
    text-align: center;
    color: rgba(181, 169, 223, 0.35);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
        gap: 25px;
    }

    .video-preview-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .logo-icon {
        font-size: 2.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .downloader-card {
        padding: 20px 15px;
    }
    
    .input-wrapper {
        flex-direction: column;
        padding: 12px;
        align-items: stretch;
        gap: 12px;
    }
    
    .input-wrapper input {
        padding: 10px;
        text-align: center;
        width: 100%;
    }
    
    .btn-primary {
        justify-content: center;
        width: 100%;
    }
}

/* Top Left Brand Logo */
.top-left-logo {
    position: absolute;
    top: 30px;
    left: 20px;
    z-index: 10;
}
.top-left-logo img {
    height: 35px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .top-left-logo {
        position: static;
        margin: 0 auto 15px auto;
        display: flex;
        justify-content: center;
    }
}

/* =========================================
   AUTH MODAL STYLES
   ========================================= */

/* Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    animation: fadeIn 0.3s ease forwards;
}

/* Modal Card */
.auth-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(145deg, #161616, #1a1a1a);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 28px;
    padding: 40px 36px 36px;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: modalSlideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    overflow: hidden;
}

.auth-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary), var(--accent-pink));
}

@keyframes modalSlideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Close Button */
.auth-close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-close-btn:hover {
    background: rgba(255, 67, 101, 0.2);
    border-color: var(--accent-error);
    color: var(--accent-error);
    transform: rotate(90deg);
}

/* Auth Header */
.auth-modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #000;
    margin: 0 auto 16px;
    box-shadow: 0 8px 25px var(--accent-primary-glow);
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 8px 25px var(--accent-primary-glow); }
    50% { box-shadow: 0 8px 40px rgba(255, 153, 0, 0.6); }
}

.auth-modal-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, #ffd080 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

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

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), #d87d00);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.35);
}

.auth-tab:not(.active):hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
}

/* Auth Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeIn 0.3s ease forwards;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 7px;
}

.auth-input-group label i {
    color: var(--accent-primary);
    font-size: 0.8rem;
}

.auth-input-group input {
    width: 100%;
    background: rgba(10, 5, 20, 0.6);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--color-text);
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    direction: ltr;
    text-align: right;
}

.auth-input-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary-glow);
    background: rgba(15, 8, 30, 0.8);
}

.auth-input-group input::placeholder {
    color: rgba(166, 166, 166, 0.4);
    direction: ltr;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-left: 48px !important;
}

.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s ease;
}

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

/* Auth Error/Success */
.auth-error {
    background: rgba(255, 67, 101, 0.1);
    border: 1px solid rgba(255, 67, 101, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #ffb3c1;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.auth-success {
    background: rgba(0, 255, 135, 0.1);
    border: 1px solid rgba(0, 255, 135, 0.4);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #00ff87;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #d87d00 100%);
    color: #000;
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-family: var(--font-arabic);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(255, 153, 0, 0.3);
    margin-top: 4px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.5);
    background: linear-gradient(135deg, #ffa31a 0%, var(--accent-primary) 100%);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Switch Text */
.auth-switch-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.auth-switch-text a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.auth-switch-text a:hover {
    color: var(--accent-secondary);
}

/* =========================================
   USER ACCOUNT WIDGET
   ========================================= */
.user-account-widget {
    position: absolute;
    top: 30px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 50px;
    padding: 6px 12px 6px 6px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease forwards;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-pink));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #000;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-status {
    font-size: 0.72rem;
    color: var(--accent-success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-success);
    box-shadow: 0 0 6px var(--accent-success);
    animation: pulse 2s infinite;
}

.btn-signout {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 67, 101, 0.12);
    border: 1px solid rgba(255, 67, 101, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: #ff8fa3;
    font-family: var(--font-arabic);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-signout:hover {
    background: rgba(255, 67, 101, 0.25);
    border-color: var(--accent-error);
    color: #fff;
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .user-account-widget {
        position: static;
        margin: 0 auto;
        width: fit-content;
    }

    .auth-modal {
        padding: 30px 22px 26px;
    }
}

/* =========================================
   USER PRO BADGE
   ========================================= */
.user-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(255, 200, 0, 0.5);
    animation: pro-glow 2s infinite ease-in-out;
    white-space: nowrap;
}

.user-pro-badge i {
    font-size: 0.6rem;
    color: #000;
}

@keyframes pro-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 200, 0, 0.5); }
    50%       { box-shadow: 0 0 18px rgba(255, 200, 0, 0.9); }
}

/* =========================================
   UPGRADE MODAL
   ========================================= */
.upgrade-modal {
    position: relative;
    width: 100%;
    max-width: 580px;
    background: linear-gradient(145deg, #131313, #1b1b1b);
    border: 1px solid rgba(255, 200, 0, 0.2);
    border-radius: 28px;
    padding: 40px 32px 32px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    animation: modalSlideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    overflow: hidden;
}

.upgrade-modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffcc00, #ff9900, #ff6b00);
}

/* Upgrade Header */
.upgrade-header {
    text-align: center;
    margin-bottom: 28px;
}

.upgrade-lock-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,200,0,0.15), rgba(255,100,0,0.15));
    border: 1px solid rgba(255, 180, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffcc00;
    margin: 0 auto 16px;
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.2);
}

.upgrade-header h2 {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.pro-gradient-text {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upgrade-header p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* =========================================
   PRICING CARDS
   ========================================= */
.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 28px;
}

.pricing-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: rgba(255, 153, 0, 0.35);
    background: rgba(255, 153, 0, 0.04);
    transform: translateY(-3px);
}

.pricing-card.featured {
    border-color: rgba(255, 200, 0, 0.4);
    background: linear-gradient(145deg, rgba(255,200,0,0.06), rgba(255,100,0,0.04));
    box-shadow: 0 0 25px rgba(255, 200, 0, 0.12), inset 0 1px 0 rgba(255, 220, 0, 0.1);
}

.pricing-card.featured:hover {
    border-color: rgba(255, 200, 0, 0.65);
    box-shadow: 0 0 40px rgba(255, 200, 0, 0.22);
}

/* Best Value Badge */
.best-value-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #000;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(255, 180, 0, 0.4);
}

/* Plan Icon */
.plan-icon {
    font-size: 1.6rem;
    color: var(--color-text-muted);
}

.plan-icon.gold {
    color: #ffcc00;
    filter: drop-shadow(0 0 8px rgba(255, 200, 0, 0.5));
}

/* Plan Name */
.plan-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

/* Plan Price */
.plan-price {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    line-height: 1;
}

.price-currency {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding-bottom: 4px;
    font-family: var(--font-english);
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-english);
    letter-spacing: -1px;
}

.pricing-card.featured .price-amount {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-period {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding-bottom: 5px;
    font-family: var(--font-english);
}

/* Plan Savings */
.plan-savings {
    font-size: 0.75rem;
    color: #00ff87;
    font-weight: 600;
    background: rgba(0, 255, 135, 0.08);
    border: 1px solid rgba(0, 255, 135, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    text-align: center;
}

/* Plan Features */
.plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.plan-features li i {
    color: var(--accent-success);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Gumroad Buy Button */
.btn-buy-gumroad {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 11px 14px;
    color: #fff;
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-buy-gumroad:hover {
    background: rgba(255, 153, 0, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.25);
}

.btn-buy-gumroad.featured {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    border-color: transparent;
    color: #000;
    box-shadow: 0 5px 15px rgba(255, 180, 0, 0.35);
}

.btn-buy-gumroad.featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 180, 0, 0.5);
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

/* =========================================
   LICENSE ACTIVATION SECTION
   ========================================= */
.activate-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activate-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.activate-divider::before,
.activate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.activate-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.license-select {
    background: rgba(10, 5, 20, 0.7);
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    padding: 11px 12px;
    color: var(--color-text);
    font-family: var(--font-arabic);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.license-select:focus {
    border-color: var(--accent-primary);
}

.license-input {
    flex: 1;
    background: rgba(10, 5, 20, 0.7);
    border: 1.5px solid var(--glass-border);
    border-radius: 10px;
    padding: 11px 14px;
    color: var(--color-text);
    font-family: var(--font-english);
    font-size: 0.9rem;
    outline: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-align: center;
}

.license-input:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 200, 0, 0.2);
}

.license-input::placeholder {
    color: rgba(166, 166, 166, 0.3);
    letter-spacing: 2px;
}

.btn-activate {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 180, 0, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-activate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 180, 0, 0.5);
}

.btn-activate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Upgrade Modal */
@media (max-width: 640px) {
    .upgrade-modal {
        padding: 30px 18px 24px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .activate-form {
        flex-direction: column;
    }

    .license-input,
    .license-select,
    .btn-activate {
        width: 100%;
        justify-content: center;
    }
}
