:root {
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-color: #d4af37;
    --accent-glow: rgba(212, 175, 55, 0.4);
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Amiri', serif;
    --font-body: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-color);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    padding: 16px;
    box-sizing: border-box;
}

/* Background Effects */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at center, var(--secondary-color) 0%, var(--primary-color) 100%);
    pointer-events: none;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
    opacity: 0.04;
    z-index: 2;
    pointer-events: none;
}

/* Main Container */
.maintenance-container {
    position: relative;
    z-index: 10;
    background: rgba(27, 38, 59, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px 20px;
    max-width: 600px;
    width: 100%;
    margin: auto;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02);
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(40px);
    opacity: 0;
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Emblem */
.emblem-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.emblem {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-color), #a68420);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    box-shadow: 0 0 35px var(--accent-glow);
    position: relative;
    flex-shrink: 0;
}

.emblem::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    animation: pulse 2.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Typography */
.subtitle {
    font-family: var(--font-body);
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 6vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(to left, #ffffff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
    word-wrap: break-word;
}

.description {
    font-size: clamp(0.95rem, 3vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 28px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
    padding: 0 8px;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    max-width: 320px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 auto 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, transparent, var(--accent-color));
    border-radius: 4px;
    animation: loading 2.5s infinite ease-in-out;
}

@keyframes loading {
    0% {
        right: -20%;
        width: 20%;
    }
    50% {
        width: 50%;
    }
    100% {
        right: 100%;
        width: 20%;
    }
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* Contact Section */
.contact-info p {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-weight: 600;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 25px var(--accent-glow);
    border-color: var(--accent-color);
}

/* Footer */
.footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.6);
}

/* Responsive Design - Tablets */
@media (min-width: 768px) {
    .maintenance-container {
        padding: 40px 32px;
        border-radius: 24px;
    }

    .emblem {
        width: 80px;
        height: 80px;
    }

    .emblem::after {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
    }

    .progress-container {
        max-width: 400px;
    }
}

/* Responsive Design - Small phones */
@media (max-width: 360px) {
    body {
        padding: 12px;
    }

    .maintenance-container {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .emblem {
        width: 60px;
        height: 60px;
    }

    .emblem::after {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }

    .title {
        font-size: 1.6rem;
    }

    .description {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .progress-container {
        max-width: 260px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .maintenance-container {
        padding: 20px 24px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .emblem-container {
        margin-bottom: 16px;
    }

    .emblem {
        width: 50px;
        height: 50px;
    }

    .emblem::after {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
    }

    .title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .description {
        margin-bottom: 16px;
        line-height: 1.6;
    }

    .footer {
        margin-top: 16px;
        padding-top: 12px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .maintenance-container {
        padding-top: max(32px, env(safe-area-inset-top));
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}
