/* ============================================================
   ROYAL HERITAGE THEME - GALLERY STYLES
   ============================================================ */

.gallery-body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ========================================= */
/* PIN SCREEN OVERLAY                        */
/* ========================================= */

.pin-screen {
    position: fixed;
    inset: 0;
    background: rgba(12,4,4,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.pin-box {
    text-align: center;
    padding: 50px 40px;
    background: #1A0808;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.pin-box::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(212,175,55,0.1);
    pointer-events: none;
    border-radius: calc(var(--radius) - 2px);
}

.pin-box h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.pin-box p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.otp-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.otp-input {
    width: 50px;
    height: 60px;
    font-size: 2rem;
    text-align: center;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: var(--radius);
    color: var(--text-dark);
    font-family: 'Playfair Display', serif;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(212,175,55,0.2);
    background: rgba(26,8,8,0.8);
    transform: translateY(-5px);
}

.error-msg {
    color: var(--ruby);
    font-size: 0.9rem;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ========================================= */
/* GALLERY WRAPPER                           */
/* ========================================= */

.gallery-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
}

.gallery-bg-image {
    position: fixed;
    inset: 0;
    background: url('../images/bg-gallery-memory-vault.webp') center/cover;
    z-index: -2;
}

.gallery-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(12,4,4,0.6), rgba(12,4,4,0.95));
}

.gallery-ambient {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212,175,55,0.15) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* ========================================= */
/* ALBUMS SCREEN                             */
/* ========================================= */

.albums-screen {
    width: 100%;
    max-width: 900px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.album-card {
    background: rgba(26,8,8,0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0 0 34px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.album-preview {
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(180deg, transparent, rgba(12, 4, 4, 0.72)),
        url('../images/royal-palace-hero.webp') center/cover;
    border-bottom: 1px solid rgba(212,175,55,0.22);
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
}

.album-preview::after {
    background: linear-gradient(105deg, transparent 20%, rgba(255, 232, 142, 0.34), transparent 58%);
    content: "";
    height: 100%;
    left: -80%;
    position: absolute;
    top: 0;
    transform: skewX(-16deg);
    width: 42%;
}

.album-card:hover .album-preview::after {
    animation: visualGlint 0.95s ease forwards;
}

.album-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(212,175,55,0.2);
    pointer-events: none;
    transition: all 0.4s ease;
}

.album-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.7), 0 0 20px rgba(212,175,55,0.2);
}

.album-card:hover::before {
    border-color: rgba(212,175,55,0.5);
    inset: 5px;
}

.album-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: rgba(212,175,55,0.1);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(212,175,55,0.2);
}

.album-card:hover .album-icon-wrapper {
    background: var(--primary);
    color: #000;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 25px rgba(212,175,55,0.5);
}

.album-card h3 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding: 0 32px;
}

.album-card p {
    color: var(--text-light);
    margin-bottom: 35px;
    line-height: 1.6;
    padding: 0 32px;
}

.action-btn {
    margin: 0 auto;
    width: calc(100% - 64px);
}

/* ========================================= */
/* RESPONSIVE                                */
/* ========================================= */

@media (max-width: 768px) {
    .album-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .otp-container {
        gap: 10px;
    }
    
    .pin-box {
        padding: 40px 20px;
    }

    .gallery-wrapper {
        align-items: flex-start;
        padding: 92px 14px 56px;
    }

    .album-card {
        padding-bottom: 26px;
    }

    .album-card h3,
    .album-card p {
        padding: 0 24px;
    }

    .action-btn {
        width: calc(100% - 48px);
    }
}
