/* Global Variables & Reset */
:root {
    --primary-color: #ff3366; /* Vibrant Birthday Pink */
    --secondary-color: #ff9933; /* Festive Orange */
    --bg-dark: #1a0b1c; /* Deep warm purple */
    --text-light: #fff5f8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden; /* Allow scrolling if absolutely needed, but avoid X scroll */
}

/* Force outfit font on headings which Bootstrap might override */
h1.gradient-text, h2.welcome-title, p.subtitle, .input-group-custom input, .btn-glow {
    font-family: 'Outfit', sans-serif !important;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out;
}

.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1 !important;
}

/* ==================================
   LOGIN SCREEN (Glassmorphism)
   ================================== */
#login-screen {
    background: linear-gradient(135deg, rgba(26, 11, 28, 0.95), rgba(48, 16, 36, 0.95)), 
                url('references/1.jpeg') center/cover no-repeat;
    z-index: 10;
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255,255,255,0.05);
    border-radius: 30px;
    padding: 3rem 2rem;
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: translateY(0);
    animation: float 6s ease-in-out infinite, slideUp 0.8s ease-out;
}

.cake-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 51, 102, 0.5));
    animation: pulse 3s infinite;
}

.gradient-text {
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffcc00, #ff3366, #ff9933);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.subtitle {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 300;
    font-style: normal !important;
}

.input-group-custom {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

input[type="password"]#password_input {
    width: 100%;
    padding: 1rem 1.2rem;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 2px;
}

input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 77, 121, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.btn-glow {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 77, 121, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(255, 77, 121, 0.6);
}

.btn-glow:active {
    transform: translateY(2px);
}

.error-msg {
    color: #ef4444;
    margin-top: 1rem;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================
   WELCOME / INTERMEDIATE SCREEN
   ================================== */
#welcome-screen {
    background: linear-gradient(135deg, rgba(8, 5, 15, 0.95), rgba(30, 10, 20, 0.95)), 
                url('references/2.jpeg') center/cover no-repeat;
    z-index: 8;
}

.welcome-content {
    animation: slideUp 1s ease-out;
}

.welcome-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #ffffff, #ffcc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}

.btn-large {
    padding: 1.5rem 2.5rem;
    font-size: 1.5rem;
    border-radius: 50px;
    letter-spacing: 1px;
    box-shadow: 0 15px 35px rgba(255, 77, 121, 0.5);
}

/* ==================================
   SLIDESHOW SCREEN 
   ================================== */
#slideshow-screen {
    background-color: #000;
    flex-direction: column;
    z-index: 5;
    position: relative;
    overflow: hidden;
}

.bg-blur-layer {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: url('references/1.jpeg');
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.4);
    z-index: 0;
    transition: background-image 1s ease-in-out;
}

.slideshow-container {
    position: relative;
    width: 90vw;
    max-width: 600px;
    height: 70vh; /* Gives room for the caption below */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.photo-layer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    border-radius: 16px; 
    border: 2px solid rgba(255,255,255,0.1);
    transition: opacity 1s ease-in-out; /* Smooth cross-fade */
}

.slideshow-caption {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,1);
    animation: pulse 4s infinite, slideUp 1s ease-out 0.5s both;
    text-align: center;
    padding: 0 20px;
    z-index: 2;
}

/* ==================================
   PHOTO GALLERY GRID 
   ================================== */
#gallery-screen {
    background-image: radial-gradient(circle at center, rgba(30,10,20, 0.8) 0%, rgba(5,0,10, 1) 100%),
                      url('https://www.transparenttextures.com/patterns/stardust.png');
    background-blend-mode: color-dodge;
    padding: 60px 20px;
    align-items: flex-start;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 3 / 4; /* Standard portrait ratio */
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(235, 94, 40, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease, transform 0.5s ease;
    cursor: pointer;
}

.gallery-item:hover img {
    filter: brightness(1.1) contrast(1.2);
    transform: scale(1.05); /* Slight zoom on hover */
}

/* ==================================
   IMAGE POPUP MODAL 
   ================================== */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay:not(.hidden) .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* ==================================
   MOBILE BALLOON FIXES 
   ================================== */
@media (max-width: 768px) {
    .balloons {
        transform: scale(0.6); /* Shrink balloons down so 7 can fit on a tiny screen */
        margin: -20px; /* Compress the visual footprint */
    }
    .balloons h2 {
        font-size: 5rem; /* Ensure letters are readable inside the scaled down balloon */
    }
    #b11 { left: 5% !important; top: 180px !important; }
    #b22 { left: 18% !important; top: 220px !important; }
    #b33 { left: 32% !important; top: 190px !important; }
    #b44 { left: 45% !important; top: 230px !important; }
    #b55 { left: 58% !important; top: 180px !important; }
    #b66 { left: 72% !important; top: 210px !important; }
    #b77 { left: 86% !important; top: 190px !important; }
}

/* ==================================
   ANIMATIONS 
   ================================== */
@keyframes float {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

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

@keyframes pulse {
    0%   { opacity: 0.8; }
    50%  { opacity: 1; }
    100% { opacity: 0.8; }
}
