*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Segoe UI", Arial, sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
    background:
        radial-gradient(circle at top left, #ffd8e9, transparent 32%),
        radial-gradient(circle at bottom right, #e9ddff, transparent 35%),
        linear-gradient(135deg, #fff8fb, #f8f0ff);
    color:#3b2430;
    padding:18px;
    overflow-x:hidden;
}

/* LOGIN PAGE */

.login-body{
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
}

.login-card{
    width:100%;
    max-width:420px;
    padding:38px 30px;
    border-radius:32px;
    text-align:center;
    background:rgba(255,255,255,0.72);
    backdrop-filter:blur(20px);
    box-shadow:0 25px 70px rgba(140,50,90,0.18);
    border:1px solid rgba(255,255,255,0.8);
    animation:fadeUp .7s ease;
}

.lock-icon{
    width:72px;
    height:72px;
    margin:0 auto 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:24px;
    font-size:32px;
    background:linear-gradient(135deg,#ffe0ed,#f3e5ff);
    box-shadow:0 14px 35px rgba(194,24,91,0.18);
}

.login-card h1{
    font-size:34px;
    color:#b5165a;
    margin-bottom:8px;
}

.login-card p{
    color:#7a5b68;
    font-size:15px;
    margin-bottom:25px;
}

.input-box input{
    width:100%;
    padding:16px 17px;
    border:none;
    outline:none;
    border-radius:17px;
    background:#fff;
    font-size:16px;
    color:#3b2430;
    box-shadow:inset 0 0 0 1px rgba(194,24,91,0.12);
}

.input-box input:focus{
    box-shadow:inset 0 0 0 2px rgba(194,24,91,0.35);
}

.login-card button{
    width:100%;
    margin-top:16px;
    padding:16px;
    border:none;
    border-radius:17px;
    cursor:pointer;
    font-size:16px;
    font-weight:700;
    color:white;
    background:linear-gradient(135deg,#ff6fa3,#c2185b);
    box-shadow:0 14px 30px rgba(194,24,91,0.28);
    transition:.3s ease;
}

.login-card button:hover{
    transform:translateY(-2px);
    box-shadow:0 18px 38px rgba(194,24,91,0.36);
}

.error-box{
    margin-top:16px;
    padding:12px;
    border-radius:14px;
    background:#ffe7e7;
    color:#c62828;
    font-size:14px;
    font-weight:600;
}

.login-bg-heart{
    position:fixed;
    z-index:-1;
    color:rgba(194,24,91,0.12);
    font-size:120px;
    animation:floatHeart 7s ease-in-out infinite;
}

.login-bg-heart.h1{
    top:12%;
    left:12%;
}

.login-bg-heart.h2{
    right:12%;
    bottom:12%;
    animation-delay:2s;
}

/* WELCOME SCREEN */

.welcome-screen{
    position:fixed;
    inset:0;
    z-index:50000;
    overflow:hidden;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#000;
    animation:fadeIn .6s ease;
}

.welcome-bg{
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
    animation:slowZoom 5s ease forwards;
}

.welcome-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.68),
            rgba(0,0,0,0.18)
        );
    backdrop-filter:blur(3px);
    display:flex;
    justify-content:center;
    align-items:center;
}

.welcome-content{
    text-align:center;
    color:white;
    padding:20px;
    animation:welcomeUp 1s ease;
}

.welcome-heart{
    font-size:62px;
    margin-bottom:18px;
    animation:pulseHeart 2s infinite;
}

.welcome-content h1{
    font-size:54px;
    font-weight:800;
    margin-bottom:10px;
    text-shadow:0 10px 30px rgba(0,0,0,0.4);
}

.welcome-content p{
    font-size:18px;
    opacity:0.95;
}

.hideWelcome{
    animation:fadeOut .8s ease forwards;
}

/* TOP BAR */

.top-bar{
    max-width:1250px;
    margin:0 auto 28px;
    padding:16px 18px;
    border-radius:26px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    background:rgba(255,255,255,0.7);
    backdrop-filter:blur(18px);
    box-shadow:0 18px 55px rgba(130,50,90,0.12);
    border:1px solid rgba(255,255,255,0.8);
    animation:slideDown .6s ease;
}

.brand{
    display:flex;
    align-items:center;
    gap:13px;
}

.brand-icon{
    width:48px;
    height:48px;
    border-radius:17px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#ffe0ed,#f3e5ff);
    font-size:24px;
}

.brand h2{
    color:#b5165a;
    font-size:21px;
    line-height:1.1;
}

.brand p{
    font-size:13px;
    color:#806070;
    margin-top:4px;
}

.top-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.logout,
.open-upload-btn{
    text-decoration:none;
    border:none;
    padding:12px 17px;
    border-radius:15px;
    color:white;
    cursor:pointer;
    font-size:14px;
    font-weight:700;
    background:linear-gradient(135deg,#ff6fa3,#c2185b);
    box-shadow:0 12px 26px rgba(194,24,91,0.25);
    transition:.3s ease;
    white-space:nowrap;
}

.logout:hover,
.open-upload-btn:hover{
    transform:translateY(-2px);
}

/* MESSAGES */

.upload-action-box{
    max-width:1250px;
    margin:0 auto 20px;
}

.upload-msg,
.delete-msg{
    padding:14px 16px;
    border-radius:18px;
    margin-bottom:12px;
    font-weight:600;
}

.upload-msg{
    background:#e7ffe9;
    color:#188038;
}

.delete-msg{
    background:#ffe7e7;
    color:#c62828;
}

/* GALLERY */

.gallery-wrap{
    max-width:1250px;
    margin:auto;
}

.gallery{
    columns:4 260px;
    column-gap:20px;
}

.photo-card{
    position:relative;
    margin-bottom:20px;
    break-inside:avoid;
    overflow:hidden;
    border-radius:26px;
    background:white;
    box-shadow:0 18px 45px rgba(80,40,70,0.13);
    cursor:pointer;
    transition:.35s ease;
    animation:fadeUp .7s ease both;
}

.photo-card:hover{
    transform:translateY(-6px);
    box-shadow:0 25px 60px rgba(80,40,70,0.20);
}

.photo-card img{
    width:100%;
    display:block;
    transition:.4s ease;
}

.photo-card:hover img{
    transform:scale(1.035);
}

.photo-card::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
    transform:translateX(-120%);
    transition:.7s ease;
    pointer-events:none;
}

.photo-card:hover::after{
    transform:translateX(120%);
}

/* DELETE BUTTON */

.delete-form{
    position:absolute;
    top:10px;
    right:10px;
    z-index:10;
}

.delete-form button{
    width:38px;
    height:38px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:rgba(255,255,255,.92);
    color:#c2185b;
    font-size:26px;
    font-weight:700;
    box-shadow:0 8px 22px rgba(0,0,0,.22);
    transition:.25s ease;
}

.delete-form button:hover{
    background:#c2185b;
    color:white;
    transform:scale(1.08);
}

/* VIEWER */

.viewer{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    padding:20px;
    z-index:9999;
    background:rgba(0,0,0,.88);
    backdrop-filter:blur(12px);
    animation:fadeIn .25s ease;
}

.viewer img{
    max-width:96%;
    max-height:94vh;
    border-radius:20px;
    box-shadow:0 25px 80px rgba(0,0,0,.55);
    animation:zoomIn .3s ease;
}

.close-btn{
    position:absolute;
    top:22px;
    right:22px;
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    font-size:31px;
    line-height:1;
    cursor:pointer;
    color:#111;
    background:white;
    box-shadow:0 10px 35px rgba(0,0,0,.25);
    z-index:10001;
}

.nav-btn{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:54px;
    height:54px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    background:rgba(255,255,255,.92);
    color:#111;
    font-size:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 12px 35px rgba(0,0,0,.25);
    transition:.25s ease;
}

.nav-btn:hover{
    transform:translateY(-50%) scale(1.08);
}

.prev-btn{
    left:24px;
}

.next-btn{
    right:24px;
}

/* UPLOAD MODAL */

.upload-modal,
.delete-modal{
    position:fixed;
    inset:0;
    display:none;
    align-items:center;
    justify-content:center;
    z-index:35000;
    padding:20px;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(14px);
}

.upload-modal-box,
.delete-modal-box{
    width:100%;
    max-width:420px;
    position:relative;
    text-align:center;
    padding:34px 24px;
    border-radius:30px;
    background:rgba(255,255,255,.92);
    box-shadow:0 25px 80px rgba(0,0,0,.28);
    animation:zoomIn .3s ease;
}

.upload-close,
.delete-close{
    position:absolute;
    top:14px;
    right:14px;
    width:38px;
    height:38px;
    border:none;
    border-radius:50%;
    cursor:pointer;
    font-size:26px;
    background:#fff;
    color:#c2185b;
    box-shadow:0 8px 22px rgba(0,0,0,.16);
}

.upload-icon,
.delete-icon{
    width:70px;
    height:70px;
    margin:0 auto 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:24px;
    font-size:32px;
    background:linear-gradient(135deg,#ffe0ed,#f3e5ff);
}

.upload-modal-box h2,
.delete-modal-box h2{
    color:#b5165a;
    margin-bottom:8px;
}

.upload-modal-box p,
.delete-modal-box p{
    color:#725666;
    font-size:15px;
    margin-bottom:20px;
}

.custom-file{
    display:block;
    width:100%;
    margin-bottom:14px;
}

.custom-file input{
    display:none;
}

.custom-file span{
    display:block;
    padding:16px;
    border-radius:17px;
    cursor:pointer;
    color:#b5165a;
    font-weight:700;
    background:white;
    box-shadow:inset 0 0 0 1px rgba(194,24,91,.18);
    transition:.25s ease;
}

.custom-file span:hover{
    box-shadow:inset 0 0 0 2px rgba(194,24,91,.28);
}

.modal-upload-btn,
.delete-modal-box button[type="submit"]{
    width:100%;
    border:none;
    padding:16px;
    border-radius:17px;
    cursor:pointer;
    color:white;
    font-weight:800;
    font-size:15px;
    background:linear-gradient(135deg,#ff6fa3,#c2185b);
    box-shadow:0 14px 32px rgba(194,24,91,.27);
}

.delete-modal-box input{
    width:100%;
    padding:16px;
    border:none;
    outline:none;
    border-radius:17px;
    background:white;
    font-size:15px;
    margin-bottom:14px;
    box-shadow:inset 0 0 0 1px rgba(194,24,91,.18);
}

.delete-modal-box input:focus{
    box-shadow:inset 0 0 0 2px rgba(194,24,91,.28);
}

/* LOCK SCREEN */

.blur-lock{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    z-index:20000;
    padding:20px;
    background:rgba(255,255,255,.28);
    backdrop-filter:blur(22px);
}

.blur-box{
    width:100%;
    max-width:390px;
    text-align:center;
    padding:35px 26px;
    border-radius:30px;
    background:rgba(255,255,255,.82);
    box-shadow:0 25px 80px rgba(80,40,70,.22);
    animation:zoomIn .3s ease;
}

.blur-box h2{
    color:#b5165a;
    margin-bottom:8px;
}

.blur-box p{
    color:#725666;
    font-size:15px;
    margin-bottom:22px;
}

.blur-box button{
    border:none;
    padding:14px 20px;
    border-radius:16px;
    cursor:pointer;
    color:white;
    font-weight:700;
    background:linear-gradient(135deg,#ff6fa3,#c2185b);
    box-shadow:0 14px 30px rgba(194,24,91,.25);
}

/* EMPTY */

.empty-box{
    text-align:center;
    padding:50px 20px;
    border-radius:28px;
    background:rgba(255,255,255,.75);
    box-shadow:0 18px 55px rgba(130,50,90,.13);
}

.empty-box h2{
    color:#b5165a;
    margin-bottom:8px;
}

/* ANIMATIONS */

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(22px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes slideDown{
    from{
        opacity:0;
        transform:translateY(-18px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes fadeIn{
    from{opacity:0;}
    to{opacity:1;}
}

@keyframes zoomIn{
    from{
        opacity:0;
        transform:scale(.88);
    }
    to{
        opacity:1;
        transform:scale(1);
    }
}

@keyframes floatHeart{
    0%,100%{
        transform:translateY(0) rotate(0);
    }
    50%{
        transform:translateY(-24px) rotate(8deg);
    }
}

@keyframes slowZoom{
    from{
        transform:scale(1);
    }
    to{
        transform:scale(1.08);
    }
}

@keyframes welcomeUp{
    from{
        opacity:0;
        transform:translateY(30px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes pulseHeart{
    0%,100%{
        transform:scale(1);
    }
    50%{
        transform:scale(1.12);
    }
}

@keyframes fadeOut{
    to{
        opacity:0;
        visibility:hidden;
    }
}

/* TABLET */

@media(max-width:900px){

    .gallery{
        columns:3 220px;
        column-gap:16px;
    }

    .photo-card{
        margin-bottom:16px;
        border-radius:22px;
    }

}

/* MOBILE */

@media(max-width:600px){

    body{
        padding:12px;
    }

    .top-bar{
        padding:13px;
        border-radius:22px;
        margin-bottom:18px;
        flex-direction:column;
        align-items:flex-start;
    }

    .top-actions{
        width:100%;
        justify-content:space-between;
    }

    .brand-icon{
        width:42px;
        height:42px;
        border-radius:14px;
        font-size:21px;
    }

    .brand h2{
        font-size:17px;
    }

    .brand p{
        font-size:12px;
    }

    .gallery{
        columns:2 145px;
        column-gap:12px;
    }

    .photo-card{
        border-radius:18px;
        margin-bottom:12px;
    }

    .login-card{
        padding:32px 22px;
        border-radius:28px;
    }

    .login-card h1{
        font-size:29px;
    }

    .viewer{
        padding:10px;
    }

    .viewer img{
        max-width:100%;
        max-height:90vh;
        border-radius:14px;
    }

    .close-btn{
        top:14px;
        right:14px;
        width:42px;
        height:42px;
        font-size:28px;
    }

    .nav-btn{
        width:44px;
        height:44px;
        font-size:34px;
    }

    .prev-btn{
        left:10px;
    }

    .next-btn{
        right:10px;
    }

    .welcome-content h1{
        font-size:34px;
    }

    .welcome-content p{
        font-size:15px;
    }

    .welcome-heart{
        font-size:48px;
    }

    .upload-modal-box,
    .delete-modal-box{
        padding:30px 18px;
        border-radius:26px;
    }

}

/* SMALL PHONES */

@media(max-width:380px){

    .gallery{
        columns:1;
    }

}