* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Government Official Colors - Gold/Yellow Theme */
    --primary-color: #FFD700; /* Gold - Logo Color */
    --secondary-color: #FFFFFF;
    --accent-color: #FFA500; /* Orange Gold */
    --gold-accent: #FFD700; /* Gold for highlights */
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --bg-overlay: rgba(0, 0, 0, 0.75); /* Dark overlay for government feel */
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 215, 0, 0.25);
    --input-bg: rgba(255, 255, 255, 0.1);
    --input-border: rgba(255, 215, 0, 0.4);
    --input-focus: rgba(255, 215, 0, 0.6);
    --gov-blue-light: rgba(255, 215, 0, 0.1);
}

body {
    font-family: 'Tajawal', 'Almarai', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.page-shell {
    padding: 0 24px;
    margin-top: 110px;
}

.auth-shell {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .page-shell {
        padding: 0 16px;
        margin-top: 90px;
    }
    
    .auth-shell {
        min-height: auto;
        padding-bottom: 60px;
    }
}

/* Arabic Text Styling */
.arabic-text,
[lang="ar"] {
    font-family: 'Tajawal', 'Almarai', sans-serif;
    font-weight: 500;
}

/* Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 100%);
}

/* Container */
.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1;
}

/* Egyptian Patterns Background */
.egyptian-patterns {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.1;
}

.pattern {
    position: absolute;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.1), transparent);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.pattern-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.pattern-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.pattern-3 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Egyptian Header */
.egyptian-header {
    margin-bottom: 20px;
    animation: fadeInDown 1s ease-out;
}

.hieroglyphic-border {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}

.hieroglyph {
    font-size: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    animation: hieroglyphPulse 3s infinite ease-in-out;
    opacity: 0.9;
}

.hieroglyph:nth-child(1) { animation-delay: 0s; }
.hieroglyph:nth-child(2) { animation-delay: 0.6s; }
.hieroglyph:nth-child(3) { animation-delay: 1.2s; }
.hieroglyph:nth-child(4) { animation-delay: 1.8s; }
.hieroglyph:nth-child(5) { animation-delay: 2.4s; }

@keyframes hieroglyphPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Logo with Egyptian Sun */
.logo-container {
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out;
    position: relative;
}

.logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.logo:hover {
    transform: scale(1.01);
}

.logo-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: glowPulse 6s infinite ease-in-out;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 1s ease-out;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* RTL Support for Auth Card */
.auth-card {
    text-align: right;
    direction: rtl;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
}

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

.egyptian-icon {
    font-size: 3rem;
    color: var(--gold-accent);
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    animation: iconGlow 4s infinite ease-in-out;
    transition: all 0.2s ease;
}

.egyptian-icon:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 165, 0, 0.4);
    transform: scale(1.02);
}

@keyframes iconGlow {
    0%, 100% {
        opacity: 0.95;
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    }
}

.title-underline {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    margin: 15px auto;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Titles */
.welcome-title,
.auth-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 165, 0, 0.3);
    position: relative;
    line-height: 1.4;
}

.welcome-title {
    font-family: 'Tajawal', 'Almarai', sans-serif;
    font-weight: 700;
}

.welcome-title-arabic {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
    font-weight: 500;
    font-family: 'Tajawal', 'Almarai', sans-serif;
}

.welcome-subtitle,
.auth-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.welcome-subtitle i {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Features Showcase */
.features-showcase {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 12px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.25);
}

.feature-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.feature-item span {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* System Description Cards */
.system-description {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.description-card {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.description-card:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.25);
}

.description-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    display: block;
}

.description-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.description-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* Buttons */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn span {
    position: relative;
    z-index: 1;
}

.btn i {
    position: relative;
    z-index: 1;
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.8s ease;
    opacity: 0.5;
}

.btn:hover .btn-shine {
    left: 100%;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-full {
    width: 100%;
}

/* Form */
.auth-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: start;
}

/* RTL Support for Forms */
.form-group label {
    text-align: right;
    direction: rtl;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: start;
}

/* RTL Support for Inputs */
.form-group input {
    text-align: right;
    direction: rtl;
}

.form-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.form-group input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

/* Select Dropdown */
.form-select {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FFD700' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-right: 15px;
    padding-left: 40px;
}

.form-select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.15);
}

.form-select option {
    background: var(--secondary-color);
    color: var(--text-primary);
    padding: 10px;
}

/* Image Upload */
.image-upload-container {
    position: relative;
}

.image-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.image-upload-label {
    display: block;
    cursor: pointer;
    width: 100%;
}

.image-preview-container {
    width: 100%;
    min-height: 200px;
    border: 2px dashed var(--input-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.image-upload-label:hover .image-preview-container {
    border-color: var(--input-focus);
    background: rgba(255, 255, 255, 0.15);
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    padding: 20px;
    text-align: center;
}

.image-placeholder svg {
    color: var(--primary-color);
    opacity: 0.7;
}

.image-placeholder span {
    font-size: 0.9rem;
}

.image-preview {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.image-preview-container.has-image .image-placeholder {
    display: none;
}

.image-preview-container.has-image {
    border-style: solid;
    min-height: auto;
}

.btn-remove-image {
    margin-top: 10px;
    padding: 8px 15px;
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 8px;
    color: #F44336;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-remove-image:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: #F44336;
}

.form-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-left: 8px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 5px;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Egyptian Footer Decoration */
.egyptian-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.pyramid-decoration {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 15px;
    height: 40px;
}

.pyramid {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 25px solid var(--primary-color);
    opacity: 0.6;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    animation: pyramidGlow 2s infinite ease-in-out;
}

.pyramid:nth-child(1) {
    border-bottom-width: 20px;
    animation-delay: 0s;
}

.pyramid:nth-child(2) {
    border-bottom-width: 30px;
    animation-delay: 0.3s;
}

.pyramid:nth-child(3) {
    border-bottom-width: 20px;
    animation-delay: 0.6s;
}

@keyframes pyramidGlow {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }
}

/* Egyptian Footer Text */
.egyptian-footer-text {
    margin-top: 40px;
    text-align: center;
    padding: 20px;
    animation: fadeInUp 1.5s ease-out;
}

.egyptian-footer-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.egyptian-footer-text i {
    color: var(--primary-color);
    font-size: 1.3rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    animation: iconPulse 2s infinite ease-in-out;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Auth Footer */
.auth-footer {
    margin-top: 25px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hieroglyph {
        font-size: 1.5rem;
    }


    .logo {
        max-width: 150px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .welcome-title,
    .auth-title {
        font-size: 2rem;
    }

    .welcome-subtitle,
    .auth-subtitle {
        font-size: 0.9rem;
    }

    .features-showcase {
        gap: 15px;
    }

    .feature-item {
        min-width: 80px;
        padding: 12px;
    }

    .feature-item i {
        font-size: 1.5rem;
    }

    .egyptian-icon {
        font-size: 2.5rem;
    }

    .pyramid {
        border-left-width: 12px;
        border-right-width: 12px;
        border-bottom-width: 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .forgot-password {
        margin-top: 10px;
    }
}

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

    .hieroglyph {
        font-size: 1.2rem;
        gap: 8px;
    }


    .logo {
        max-width: 120px;
    }

    .auth-card {
        padding: 25px 15px;
    }

    .welcome-title,
    .auth-title {
        font-size: 1.3rem;
    }

    .welcome-title-arabic {
        font-size: 0.95rem;
    }

    .egyptian-icon {
        font-size: 2rem;
    }

    .features-showcase {
        gap: 10px;
    }

    .feature-item {
        min-width: 70px;
        padding: 10px;
    }

    .feature-item i {
        font-size: 1.3rem;
    }

    .feature-item span {
        font-size: 0.75rem;
    }

    .pyramid {
        border-left-width: 10px;
        border-right-width: 10px;
        border-bottom-width: 15px;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .egyptian-footer-text p {
        font-size: 0.85rem;
        gap: 10px;
    }

    .egyptian-footer-text i {
        font-size: 1rem;
    }

    .system-description {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .description-card {
        padding: 15px;
    }

    .description-card i {
        font-size: 2rem;
    }

    .description-card h3 {
        font-size: 1rem;
    }

    .description-card p {
        font-size: 0.85rem;
    }
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success/Error Messages */
.message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4CAF50;
}

.message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #F44336;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling - Egyptian Theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

/* Page Transitions */
.page-content {
    animation: pageFadeIn 0.4s ease-out;
}

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

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    animation: tooltipFadeIn 0.3s ease;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--primary-color);
    margin-bottom: -5px;
    z-index: 1000;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Selection Color */
::selection {
    background: var(--primary-color);
    color: var(--secondary-color);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Smooth Focus Transitions */
*:focus {
    outline: none;
    transition: all 0.2s ease;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

/* Loading Spinner Enhancement */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Enhanced Button Hover Effects */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
    opacity: 0.5;
}

.btn-primary:hover::after {
    width: 200px;
    height: 200px;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Image Loading Placeholder */
img {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

img[src] {
    background: none;
    animation: none;
}

/* Enhanced Card Shadows */
.auth-card {
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-card:hover::before {
    opacity: 0.08;
    animation: borderGlow 6s infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.08;
    }
    50% {
        opacity: 0.12;
    }
}

/* Smooth Page Load */
body {
    opacity: 0;
    animation: bodyFadeIn 0.5s ease-out forwards;
}

@keyframes bodyFadeIn {
    to {
        opacity: 1;
    }
}

/* Enhanced Video Background */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 0;
}

/* Performance: GPU Acceleration */
.logo,
.btn,
.auth-card,
.feature-item {
    will-change: transform;
    transform: translateZ(0);
}

/* Print Styles */
@media print {
    .video-background,
    .egyptian-patterns,
    .egyptian-header,
    .egyptian-footer {
        display: none;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(3, 3, 3, 0.95), rgba(10, 16, 24, 0.92));
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.35);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
    z-index: 1000;
    padding: 14px 0;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.login-page .header-content,
body.home-page .header-content,
body.signup-page .header-content {
    justify-content: center;
    gap: 30px;
}

body.login-page .header-nav,
body.home-page .header-nav,
body.signup-page .header-nav {
    justify-content: center;
}

body.login-page .header-logo,
body.home-page .header-logo,
body.signup-page .header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 900px) {
    body.login-page .header-content,
    body.home-page .header-content,
    body.signup-page .header-content {
        justify-content: space-between;
        gap: 12px;
    }
    
    body.login-page .header-nav,
    body.home-page .header-nav,
    body.signup-page .header-nav {
        justify-content: flex-start;
    }

    .mobile-nav-toggle {
        display: flex;
    }
}

.header-logo img {
    height: 54px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65));
}

.header-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.25);
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 46px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    padding: 0;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f6c652, #fbe296);
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: 0 0 8px rgba(246, 198, 82, 0.55);
}

.mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.site-nav-open {
    overflow: hidden;
}

body.site-nav-open .main-header {
    pointer-events: auto;
}

/* Language Switcher - Professional Dropdown Design */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-right: 15px;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 25px;
    color: var(--text-primary);
    padding: 8px 16px 8px 40px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    font-family: 'Tajawal', 'Almarai', sans-serif;
    direction: rtl;
    text-align: right;
}

/* RTL support for dropdown */
.lang-select {
    padding: 8px 16px 8px 40px;
    text-align: right;
    direction: rtl;
}

.lang-select:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.lang-select:focus {
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2),
                0 4px 12px rgba(255, 215, 0, 0.3);
}

.lang-select option {
    background: rgba(0, 0, 0, 0.95);
    color: var(--text-primary);
    padding: 10px;
    font-weight: 600;
}

/* Custom dropdown arrow */
.language-switcher::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-primary);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.language-switcher::after {
    right: auto;
    left: 12px;
}

.language-switcher:hover::after {
    border-top-color: var(--primary-color);
}

.lang-select:focus + .language-switcher::after,
.language-switcher:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 999px;
    transition: all 0.3s ease;
    position: relative;
    text-transform: none;
    letter-spacing: 0.4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid transparent;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.nav-link:hover {
    color: #050505;
    background: linear-gradient(135deg, #f6c652, #b37b11);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.nav-link.active {
    color: #050505;
    background: linear-gradient(135deg, #fbe59c, #f6c652);
    box-shadow: 0 12px 26px rgba(246, 198, 82, 0.35);
}

.nav-link.active::after {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 18px rgba(246, 198, 82, 0.45);
}

/* Main Content Wrapper */
.main-content-wrapper {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    position: relative;
    z-index: 1;
    zoom: 0.97;
    transform: scale(0.97);
    transform-origin: top center;
}

/* Footer Styles */
.main-footer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.1);
    padding: 40px 0 20px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: var(--gold-accent);
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 10px 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin: 10px 0;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--gold-accent);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.footer-section i {
    color: var(--gold-accent);
    margin-left: 8px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.footer-bottom {
    max-width: 1400px;
    margin: 30px auto 0;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    color: var(--text-secondary);
}


/* Content Sections */
.content-section {
    margin: 60px 0;
    animation: fadeInUp 0.8s ease-out;
}

.section-card {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    animation: iconGlow 2s infinite ease-in-out;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.section-content {
    color: var(--text-primary);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-item {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    text-align: center;
}

.about-item:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.25);
}

.about-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    display: block;
}

.about-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.about-item p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.25);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.service-features li {
    color: var(--text-primary);
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.service-features i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Responsive Header & Footer */
@media (max-width: 900px) {
    .main-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        padding: 10px 0 !important;
        min-height: auto !important;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 15px !important;
    }

    .header-logo {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        flex: 1;
    }

    .header-logo img {
        height: 45px !important;
        width: auto !important;
        display: block !important;
        visibility: visible !important;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        margin-right: 12px;
    }

    .header-nav {
        position: fixed;
        top: 80px;
        right: 18px;
        left: 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        background: linear-gradient(150deg, rgba(5, 5, 5, 0.98), rgba(15, 22, 32, 0.96));
        border: 1px solid rgba(255, 215, 0, 0.28);
        border-radius: 22px;
        padding: 22px 18px;
        box-shadow: 0 30px 55px rgba(0, 0, 0, 0.6);
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
        z-index: 950;
    }

    .nav-link {
        font-size: 0.95rem;
        padding: 12px 14px;
        display: block !important;
        width: 100%;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.08);
        text-align: center;
    }

    body.site-nav-open .header-nav {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    body.site-nav-open .mobile-nav-overlay {
        opacity: 1;
        pointer-events: auto;
        background: rgba(0, 0, 0, 0.75);
    }

    .main-content-wrapper {
        margin-top: 110px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-card {
        padding: 25px 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-icon {
        font-size: 2.5rem;
    }

    .about-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-item,
    .service-card {
        padding: 20px;
    }
    
    .language-switcher {
        margin-right: 0;
    }
    
    .lang-select {
        min-width: 100%;
        font-size: 0.85rem;
        padding: 8px 34px 8px 12px;
    }
    
    .lang-select {
        padding: 8px 12px 8px 34px;
        direction: rtl;
    }
}
    .language-switcher::after {
        right: 10px;
        width: 0;
        height: 0;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 5px solid var(--text-primary);
    }
    
    html[dir="rtl"] .language-switcher::after {
        right: auto;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .main-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        padding: 8px 0 !important;
    }

    .header-content {
        padding: 0 12px !important;
        gap: 12px;
    }

    .header-logo img {
        height: 40px !important;
    }

    .header-nav {
        gap: 8px;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 5px 10px;
    }

    .language-switcher {
        margin-right: 5px;
    }
    
    .lang-select {
        min-width: 90px;
        font-size: 0.75rem;
        padding: 5px 30px 5px 10px;
    }
    
    .lang-select {
        padding: 5px 10px 5px 30px;
        direction: rtl;
    }
}