:root {
    --primary-teal: #004d40;
    --emerald-dark: #00332e;
    --soft-gold: #d4af37;
    --ivory: #fffff0;
    --cream: #f5f5dc;
    --text-color: #f5f5dc;
    --glass-bg: rgba(0, 51, 46, 0.7);
    --glass-border: rgba(212, 175, 55, 0.3);
}

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

body {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.2rem;
    color: var(--text-color);
    background-color: var(--emerald-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Locked until curtains open */
    position: relative;
}

/* Curtain Loader */
.curtain-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    pointer-events: none;
    overflow: hidden;
}

.curtain-panel {
    width: 50%;
    height: 100%;
    background: url('al_mehfuz_background.png') no-repeat;
    background-size: 200% 100%;
    position: relative;
    z-index: 1;
    filter: brightness(0.4) contrast(1.2);
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.9);
    transition: transform 1.8s cubic-bezier(1, 0, 0, 1);
}

.curtain-panel::before {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--soft-gold), transparent);
    z-index: 2;
}

.curtain-panel.left::before {
    right: 0;
}

.curtain-panel.right::before {
    left: 0;
}

/* Fabric fold effect */
.curtain-panel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.3) 0%,
            transparent 5%,
            rgba(0, 0, 0, 0.1) 10%,
            transparent 15%,
            rgba(0, 0, 0, 0.2) 20%,
            transparent 25%,
            rgba(0, 0, 0, 0.1) 30%,
            transparent 35%);
    background-size: 50% 100%;
}

.curtain-panel.left {
    background-position: 0% 50%;
    border-right: 1px solid var(--soft-gold);
    transform-origin: left;
    animation: openLeft 2.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 1.5s;
}

.curtain-panel.right {
    background-position: 100% 50%;
    border-left: 1px solid var(--soft-gold);
    transform-origin: right;
    animation: openRight 2.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    animation-delay: 1.5s;
}

/* Loader Text */
.loader-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    width: 100%;
    animation: fadeOutLoader 1.2s cubic-bezier(1, 0, 0, 1) forwards;
    animation-delay: 1.2s;
}

.bismillah-loader {
    font-family: 'Lateef', serif;
    font-size: 5rem;
    color: var(--soft-gold);
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.8);
    animation: textPulse 2.5s infinite ease-in-out;
}

@keyframes textPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes openLeft {
    to {
        transform: translateX(-100%) skewX(2deg);
    }
}

@keyframes openRight {
    to {
        transform: translateX(100%) skewX(-2deg);
    }
}

@keyframes fadeOutLoader {
    to {
        opacity: 0;
        transform: translate(-50%, -60%) scale(1.1);
        visibility: hidden;
    }
}

/* Background Image Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('al_mehfuz_background.png') no-repeat center center/cover;
    z-index: -1;
    filter: brightness(0.6) contrast(1.1);
}

/* Background Pattern/Texture */
.bg-overlay {
    position: fixed;
    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: -1;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInScale 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 1.7s;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--soft-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px var(--soft-gold));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px var(--soft-gold));
    }
}

h1 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 3.5rem;
    color: var(--soft-gold);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.language-section {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.language-section:last-child {
    border-bottom: none;
    margin-bottom: 20px;
}

.arabic-text {
    font-family: 'Lateef', serif;
    direction: rtl;
    font-size: 2.2rem;
    line-height: 1.6;
}

.arabic-text h2 {
    font-size: 3.5rem;
    /* ~56px */
    margin-bottom: 20px;
    color: var(--soft-gold);
    line-height: 1.2;
}

.hindi-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
}

.hindi-text h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--soft-gold);
}

.english-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--soft-gold);
}

.urdu-text {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    font-size: 1.4rem;
    line-height: 2.4;
}

.urdu-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--soft-gold);
}

.khutbah-small {
    color: var(--soft-gold);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.9;
}

.khutbah {
    font-family: 'Lateef', serif;
    font-size: 2.2rem;
    color: var(--soft-gold);
    margin-bottom: 25px;
    line-height: 1.2;
}

.bismillah {
    font-family: 'Lateef', serif;
    font-size: 3.5rem;
    /* ~56px */
    color: var(--soft-gold);
    margin: 20px 0;
    line-height: 1.2;
}

.cta-tag {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--soft-gold), #b38f00);
    color: var(--emerald-dark);
    font-weight: 700;
    border-radius: 50px;
    margin-top: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    color: var(--ivory);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.social-links a:hover {
    color: var(--soft-gold);
    transform: translateY(-5px);
}

.social-links a span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-note {
    margin-top: 40px;
    font-size: 0.9rem;
    opacity: 0.7;
    font-style: italic;
}

.ameen {
    color: var(--soft-gold);
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Animations */
.fade-in {
    animation: fadeIn 2s forwards;
    opacity: 0;
}

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

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 25px;
        width: 95%;
    }

    h1 {
        font-size: 2.2rem;
    }

    .arabic-text h2,
    .gujarati-text h2,
    .english-text h2 {
        font-size: 1.8rem;
    }

    .arabic-text {
        font-size: 1.2rem;
    }
}