﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Animated Gradient Background */
.page-container {
    min-height: 100vh;
    background: linear-gradient(-45deg, #f0f9ff, #f0f4ff, #fdf4ff, #f0fdf4, #fffbeb, #fef7f0);
    background-size: 400% 400%;
    animation: gradientShift 12s ease-in-out infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 100% 0%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Header Section */
.header-section {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(31, 41, 55, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1001;
}

.theme-toggle-btn:hover {
    background: #ffffff;
    border-color: rgba(79, 70, 229, 0.5);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .header-logo-circle::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
        animation: logoGlow 4s ease-in-out infinite;
    }

    .header-logo-circle:hover {
        transform: scale(1.05) translateY(-2px);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    }

.header-logo-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.header-title {
    color: #1a1a1a;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1a1a1a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    color: #666666;
    font-size: 16px;
    font-weight: 600;
    margin: 4px 0 0 0;
    direction: rtl;
    text-align: right;
}

/* Islamic Greeting Styles */
.islamic-greeting {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.1);
}

.greeting-arabic {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
    direction: rtl;
    font-family: 'Amiri', 'Times New Roman', serif;
    text-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.greeting-english {
    font-size: 16px;
    color: #047857;
    font-weight: 500;
    font-style: italic;
}

/* Main Content */
.main-content {
    padding: 120px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Welcome Section */
.welcome-section {
    max-width: 600px;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #4f46e5;
    padding: 12px 20px;
    border-radius: 32px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.badge-icon {
    width: 20px;
    height: 20px;
}

.welcome-title {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.1;
    color: #1a1a1a;
    margin-bottom: 32px;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: 20px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 48px;
    font-weight: 400;
}

/* Features Grid */
.features-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .feature-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.3), transparent);
    }

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    }

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.feature-desc {
    font-size: 16px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

/* Action Card */
.action-card {
    background: #000000;
    border-radius: 32px;
    padding: 48px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

    .action-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    }

    .action-card::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
        animation: shimmer 8s ease-in-out infinite;
        pointer-events: none;
    }

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 40px;
}

.card-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.card-logo-circle {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 48px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    .card-logo-circle::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 70%);
        animation: logoGlow 4s ease-in-out infinite;
    }

    .card-logo-circle:hover {
        transform: scale(1.1) translateY(-4px);
        box-shadow: 0 24px 64px rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.4), inset 0 2px 0 rgba(255, 255, 255, 1);
    }

.card-logo-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.card-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.card-subtitle {
    color: #a0a0a0;
    font-size: 18px;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
}

/* Card Content */
.card-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Login Section */
.login-section {
    padding: 32px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.section-desc {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 32px 0;
}

    .divider::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .divider span {
        background: #000000;
        color: #666666;
        padding: 0 20px;
        font-size: 16px;
        font-weight: 600;
        position: relative;
    }

/* Admission Section */
.admission-section {
    padding: 32px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.admission-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0 32px 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #a0a0a0;
    font-size: 16px;
    font-weight: 500;
}

.benefit-dot {
    width: 8px;
    height: 8px;
    background: #4f46e5;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.5);
}

/* Primary Button */
.primary-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 20px 32px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

    .primary-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
        transition: left 0.6s ease;
    }

    .primary-button:hover {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        transform: translateY(-4px) scale(1.02);
        box-shadow: 0 20px 48px rgba(255, 255, 255, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 2px 0 rgba(255, 255, 255, 1);
    }

        .primary-button:hover::before {
            left: 100%;
        }

    .primary-button:active {
        transform: translateY(-2px) scale(1.01);
    }

/* Secondary Button */
.secondary-button {
    background: transparent;
    color: #ffffff;
    border: 2px solid #404040;
    border-radius: 20px;
    padding: 20px 32px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

    .secondary-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .secondary-button:hover {
        border-color: #ffffff;
        color: #ffffff;
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 12px 32px rgba(255, 255, 255, 0.15);
    }

        .secondary-button:hover::before {
            opacity: 1;
        }

    .secondary-button:active {
        transform: translateY(-1px) scale(1.01);
    }

/* Footer Section */
.footer-section {
    background: rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
}

.footer-content {
    text-align: center;
}

.footer-text {
    color: #666666;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
    line-height: 1.6;
}

.arabic-footer {
    color: #059669;
    font-weight: 600;
    direction: rtl;
    display: inline-block;
    margin-top: 8px;
}

/* Animations */
@keyframes shimmer {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes logoGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .main-content {
        padding: 80px 0;
    }

    .welcome-title {
        font-size: 48px;
    }

    .greeting-arabic {
        font-size: 20px;
    }

    .greeting-english {
        font-size: 14px;
    }

    .welcome-description {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 24px;
    }

    .header-logo-circle {
        width: 60px;
        height: 60px;
    }

    .header-logo-icon {
        width: 40px;
        height: 40px;
    }

    .main-content {
        padding: 60px 0;
    }

    .welcome-title {
        font-size: 36px;
    }

    .greeting-arabic {
        font-size: 18px;
    }

    .action-card {
        padding: 40px 32px;
        margin: 0 16px;
    }

    .card-logo-circle {
        width: 80px;
        height: 80px;
    }

    .card-logo-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .header-section {
        padding: 20px 0;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .welcome-title {
        font-size: 32px;
    }

    .islamic-greeting {
        padding: 20px;
        margin-bottom: 24px;
    }

    .greeting-arabic {
        font-size: 16px;
    }

    .greeting-english {
        font-size: 12px;
    }

    .welcome-description {
        font-size: 16px;
    }

    .action-card {
        padding: 32px 24px;
        margin: 0 12px;
    }

    .card-title {
        font-size: 24px;
    }

    .primary-button,
    .secondary-button {
        padding: 16px 24px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .welcome-title {
        font-size: 28px;
    }

    .islamic-greeting {
        padding: 16px;
    }

    .greeting-arabic {
        font-size: 14px;
    }

    .action-card {
        padding: 24px 20px;
    }
}

html[data-theme="dark"] .page-container {
    background: linear-gradient(-45deg, #020617, #0f172a, #111827, #1e293b);
}

html[data-theme="dark"] .header-section {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.9);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .theme-toggle-btn:hover {
    background: #1f2937;
    border-color: rgba(147, 197, 253, 0.5);
}

html[data-theme="dark"] .header-title {
    color: #f8fafc;
    background: linear-gradient(135deg, #f8fafc 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html[data-theme="dark"] .header-subtitle,
html[data-theme="dark"] .welcome-description,
html[data-theme="dark"] .feature-desc,
html[data-theme="dark"] .footer-text {
    color: #cbd5e1;
}

html[data-theme="dark"] .welcome-title,
html[data-theme="dark"] .feature-title {
    color: #f8fafc;
}

html[data-theme="dark"] .welcome-badge,
html[data-theme="dark"] .feature-item {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}
