@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@400;700&family=Nunito+Sans:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap");

/* Overlay Layers System for Unified Main.php */

.overlay-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.overlay-layer.active {
    opacity: 1;
    visibility: visible;
}

/* Adzan Overlay Styles */
#adzanOverlay {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%);
    font-family: "Lato", "Nunito Sans", "Montserrat";
    overflow: hidden;
    color: white;
}

#adzanOverlay .bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

#adzanOverlay .adzan-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

#adzanOverlay .adzan-title {
    font-size: 4cqw;
    font-weight: 300;
    margin-top: 3cqh;
    margin-bottom: -5cqh;
    opacity: 0.9;
    letter-spacing: 0.3cqh;
    text-transform: uppercase;
    animation: titleGlow 3s ease-in-out infinite;
    font-family: "Nunito Sans", "Montserrat";
}

#adzanOverlay .prayer-name {
    font-size: 15cqw;
    font-weight: 1000;
    height: auto;
    color: #fbbf24;
    text-shadow: 0 0 3cqh rgba(251, 191, 36, 0.6);
    margin: 0px 0;
    text-transform: uppercase;
    letter-spacing: 1cqw;
    font-family: "Poppins", "Lato", "Nunito Sans", "Montserrat";
}

#adzanOverlay .arabic-message {
    font-size: 3.0cqw;
    font-weight: 400;
    margin: 20px 0 20px 0;
    color: #fbbf24;
    font-family: "Amiri", serif;
    direction: rtl;
    text-shadow: 0 0 15px rgba(209, 250, 229, 0.3);
}

#adzanOverlay .indonesian-message {
    font-size: 1.0rem;
    font-weight: 300;
    color: #d1fae5;
    opacity: 0.9;
    margin-top: -30px;
    margin-bottom: 40px;
}

#adzanOverlay .progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10cqh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 20;
}

#adzanOverlay .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    width: 0%;
    transition: width 1s linear;
    position: relative;
    overflow: hidden;
}

#adzanOverlay .progress-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

#adzanOverlay .progress-text {
    position: fixed;
    bottom: 0.2cqh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8cqh;
    font-weight: 900;
    font-family: "Liberation Mono", "Ubuntu Sans Mono", "Courier New", "Roboto Mono", monospace;
    color: #d1fae5;
    z-index: 21;
}

/* Iqomah Overlay Styles */
#iqomahOverlay .bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1e40af, #3b82f6, #1e40af);
    background-size: 400% 400%;
    animation: gradientShift 10s ease-in-out infinite;
}

#iqomahOverlay .decoration-pattern {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#iqomahOverlay .decoration-pattern:nth-child(1) {
    top: 20%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

#iqomahOverlay .decoration-pattern:nth-child(2) {
    top: 60%;
    right: 15%;
    animation: float 8s ease-in-out infinite reverse;
}

#iqomahOverlay .decoration-pattern:nth-child(3) {
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    animation: float 10s ease-in-out infinite;
}

#iqomahOverlay .iqomah-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

#iqomahOverlay .iqomah-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#iqomahOverlay .prayer-info {
    font-size: 4rem;
    font-weight: bold;
    margin: 2rem 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
}

#iqomahOverlay .countdown-capsule {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 2rem 4rem;
    margin: 3rem 0;
    backdrop-filter: blur(10px);
}

#iqomahOverlay .countdown-time {
    font-size: 6rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

#iqomahOverlay .nasihat-container {
    margin-top: 3rem;
    max-width: 800px;
}

#iqomahOverlay .nasihat-item {
    font-size: 1.5rem;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#iqomahOverlay .nasihat-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Blank/Sholat Overlay Styles */
#blankOverlay {
    background: #000;
    color: white;
}

#blankOverlay.dawn-mode {
    background: linear-gradient(to bottom, #1a202c, #2d3748, #1a202c);
}

#blankOverlay.midnight-mode {
    background: linear-gradient(to bottom, #0f0f0f, #1a1a1a, #0f0f0f);
}

#blankOverlay.transition-mode {
    background: linear-gradient(45deg, #7c2d12, #dc2626, #7c2d12);
    background-size: 400% 400%;
    animation: gradientShift 3s ease-in-out infinite;
}

#blankOverlay .corner-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#blankOverlay .corner-decoration:nth-child(1) {
    top: 50px;
    left: 50px;
    border-right: none;
    border-bottom: none;
}

#blankOverlay .corner-decoration:nth-child(2) {
    top: 50px;
    right: 50px;
    border-left: none;
    border-bottom: none;
}

#blankOverlay .clock-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#blankOverlay .clock-time {
    font-size: 8rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    margin-bottom: 1rem;
}

#blankOverlay .clock-date {
    font-size: 2rem;
    opacity: 0.8;
    margin-bottom: 3rem;
}

#blankOverlay .progress-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#blankOverlay .progress-dots {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

#blankOverlay .progress-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

#blankOverlay .progress-dot.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}

#blankOverlay .progress-text {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Roboto Mono', monospace;
}

/* Animations */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    #adzanOverlay .prayer-name { font-size: 4rem; }
    #adzanOverlay .adzan-title { font-size: 2rem; }
    #iqomahOverlay .prayer-info { font-size: 3rem; }
    #iqomahOverlay .countdown-time { font-size: 4rem; }
    #blankOverlay .clock-time { font-size: 5rem; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes titleGlow {
    0%, 100% { 
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5); 
    }
    50% { 
        text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 20px rgba(255,255,255,0.3); 
    }
}
