:root {
    /* White & Blue Palette */
    --primary: #2563EB;
    /* Royal Blue */
    --primary-dark: #1E40AF;
    --primary-light: #DBEAFE;

    --bg-page: #F8FAFC;
    /* Slate 50 (Very light gray/white) */
    --bg-card: #FFFFFF;
    /* Pure White */

    --text-main: #0F172A;
    /* Slate 900 */
    --text-secondary: #64748B;
    /* Slate 500 */
    --text-light: #94A3B8;

    --border: #E2E8F0;

    /* Typography: Alexandria (Modern Geometric) */
    --font-family: 'Alexandria', sans-serif;

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
    --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 10px -3px rgba(0, 0, 0, 0.05);

    --glass-surface: rgba(255, 255, 255, 0.9);
    /* Opaque "Glass" */
    --glass-border: #E2E8F0;
}

/* Windows 11 Light Theme Variables */
.theme-win11-light {
    --primary: #0067C0;
    /* Windows 11 Blue */
    --primary-dark: #004E8C;
    --primary-light: #E5F1FB;

    --bg-page: #F3F3F3;
    /* Windows 11 "Mica" base */
    --bg-card: rgba(255, 255, 255, 0.85);
    /* Mica effect surface */

    --text-main: #1C1C1C;
    --text-secondary: #5D5D5D;
    --text-light: #A0A0A0;

    --border: rgba(0, 0, 0, 0.05);

    --glass-surface: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.theme-win11-light body {
    background-color: var(--bg-page);
}

.theme-win11-light .glass-card,
.theme-win11-light .auth-card,
.theme-win11-light .settings-section {
    background: var(--bg-card);
    backdrop-filter: blur(30px) saturate(125%);
    -webkit-backdrop-filter: blur(30px) saturate(125%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

.theme-win11-light .btn-primary {
    background: var(--primary);
    border-radius: 4px;
    /* Win11 uses smaller radius for buttons */
}

.theme-win11-light .btn-ghost {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

/* iOS 26 Light Glass Theme Variables */
.theme-ios26 {
    --primary: #007AFF;
    /* Apple Blue */
    --primary-dark: #0056B3;
    --primary-light: rgba(0, 122, 255, 0.1);

    --bg-page: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.45);
    /* Frosty Glass */

    --text-main: #000000;
    --text-secondary: #3D3D3D;
    --text-light: #8E8E93;

    --border: rgba(0, 0, 0, 0.08);

    --glass-surface: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.7);

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);

    --radius-lg: 24px;
    /* iOS uses very large corner radii */
    --radius-md: 18px;
    --radius-sm: 12px;
}

.theme-ios26 body {
    background: linear-gradient(135deg, #FDFCFB 0%, #E2D1C3 100%);
    background-attachment: fixed;
}

.theme-ios26 .glass-card,
.theme-ios26 .auth-card,
.theme-ios26 .settings-section {
    background: var(--bg-card);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
}

.theme-ios26 .btn-primary {
    background: rgba(0, 122, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    /* Pill buttons */
}

.theme-ios26 .btn-ghost {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
}

.theme-ios26 header {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    direction: rtl;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Modern Animated Background */
body::before,
body::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    z-index: -1;
    animation: float 20s infinite ease-in-out alternate;
}

body::before {
    background: linear-gradient(to right, #22D3EE, #9333ea);
    top: -100px;
    left: -100px;
}

body::after {
    background: linear-gradient(to right, #3b82f6, #06b6d4);
    bottom: -100px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}



a {
    text-decoration: none;
    color: var(--primary);
    transition: 0.2s;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    padding: 0.75rem 0;
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Identity - Minimalist English */
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Reduced gap */
    color: var(--text-main);
    transition: all 0.3s ease;
    text-decoration: none;
}

.brand:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.brand-logo-text {
    font-weight: 300;
    /* Thin like 'YOUSEF' */
    font-size: 0.85rem;
    /* Smaller size */
    color: #000000;
    letter-spacing: 0.02em;
    line-height: 1;
    display: flex;
    align-items: center;
}

.brand-text-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-family);
}

.brand-name {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: -0.02em;
}

.brand-name-first {
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.brand-name-last {
    font-weight: 300;
    font-size: 1.1rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.brand-v-separator {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.25rem;
}

.brand-handle-minimal {
    display: none;
    /* Removed as it's now the main logo text */
}

/* Navigation */
.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 0.75rem;
    line-height: 1.2;
}

.user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

.user-date {
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-weight: 300;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-family);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.35);
    filter: brightness(1.1);
}

.btn-ghost {
    background: rgba(226, 232, 240, 0.3);
    color: var(--text-main);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(226, 232, 240, 0.6);
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Hero */
.hero-section {
    text-align: center;
    padding: 2.5rem 1rem;
    background: transparent;
    border-radius: 0;
    margin-bottom: 2rem;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.hero-logo-large {
    width: 500px;
    max-width: 90vw;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    /* Enhanced shadow for depth */
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero-section h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

.hero-section p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Compact UI Helpers */
.compact-section {
    padding: 1.5rem !important;
}

.title-sm {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

/* Bento Grid / Cards */
.bento-grid,
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* For Bento spans if used */
@media (min-width: 900px) {
    .span-2 {
        grid-column: span 2;
    }

    .span-3 {
        grid-column: span 3;
    }
}

.glass-card,
.feed-item,
.program-item,
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.glass-card:hover,
.feed-item:hover,
.program-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-tag,
.feed-meta {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-weight: 700;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-link,
.read-more {
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card-link:hover,
.read-more:hover {
    text-decoration: underline;
    gap: 0.5rem;
    /* Slide effect */
}

/* Forms & Auth */
.auth-wrapper {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg-page);
    flex-grow: 1;
}

.auth-container,
.auth-card {
    width: 100%;
    max-width: 440px;
}

.auth-container h2,
.auth-card h2 {
    color: var(--text-main) !important;
    /* Override inline styles */
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 0.25rem;
}

.form-input,
input {
    width: 100%;
    padding: 1rem;
    padding-top: 1.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus,
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: #FFFFFF;
}

.form-input:focus+label,
.form-input:not(:placeholder-shown)+label,
input:focus+label,
input:not(:placeholder-shown)+label {
    top: -0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--primary);
    background: var(--bg-page);
    font-weight: 600;
}

/* Dashboard Items */
.program-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.program-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Responsive */
    gap: 1rem;
}

.program-meta h4 {
    margin-bottom: 0.25rem;
}

/* Footer */
footer {
    border-top: none;
    background: transparent;
    padding: 1rem 0 4rem 0;
    /* Reduced top padding to move it up */
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
    font-size: 0.7rem;
    /* Smaller font */
    font-weight: 200;
    /* Extra thin */
    letter-spacing: 0.05em;
    opacity: 0.8;
}