*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:'Poppins',sans-serif;

    min-height:100vh;

    padding:40px;

    background:
    linear-gradient(
    -45deg,
    #ffd6ea,
    #e7d9ff,
    #d7efff,
    #fff3db
    );

    background-size:400% 400%;

    animation:bgMove 15s ease infinite;
}

@keyframes bgMove{

    0%{
        background-position:0% 50%;
    }

    50%{
        background-position:100% 50%;
    }

    100%{
        background-position:0% 50%;
    }
}

.container{

    width:1300px;

    margin:auto;

    background:
    rgba(255,255,255,.18);

    border-radius:35px;

    padding:30px;

    border:
    1px solid rgba(255, 255, 255, 0.514);

    box-shadow:
    0 25px 60px rgba(0,0,0,.12);
}

/* ================= HEADER ================= */

.header{

    text-align:center;

    margin-bottom:30px;
}

.header h1{

    font-size:58px;

    background:
    linear-gradient(
    90deg,
    #ff5ca8,
    #8d7dff,
    #4dbdff
    );

    -webkit-background-clip:text;

    color:transparent;
}

.tagline{

    color:#555;

    margin-top:5px;

    font-size:17px;
}

/* ================= TOP SECTION ================= */

.top-section{

    display:grid;

    grid-template-columns:2fr 1fr;

    gap:25px;
}

/* ================= CAMERA ================= */

.camera-card{

    position:relative;

    height:550px;

    overflow:hidden;

    border-radius:30px;

    border:8px solid white;

    background:white;

    box-shadow:
    0 15px 40px rgba(0,0,0,.12);
}

.camera-card video{

    width:100%;

    height:100%;

    object-fit:cover;

    transform:scaleX(-1);
}

/* ================= FLASH ================= */

#flash{

    position:absolute;

    inset:0;

    background:rgb(188, 233, 242), #f18cfa;

    opacity:0;

    transition:.2s;
}

/* ================= TIMER ================= */

#timer{

    position:absolute;

    top:50%;

    left:50%;

    transform:
    translate(-50%,-50%);

    font-size:110px;

    color:white;

    text-shadow:
    0 0 20px black;
}

/* ================= GESTURE ================= */

#gestureText{

    position:absolute;

    bottom:20px;

    width:100%;

    text-align:center;

    color:white;

    font-weight:600;

    text-shadow:
    0 0 10px black;
}

/* ================= PREVIEW ================= */

.preview-section{

    background:
    rgba(255,255,255,.35);

    border-radius:30px;

    padding:20px;

    height:550px;

    overflow-y:auto;
}

.preview-section h3{

    margin-bottom:15px;

    color:#140505;
}

#photoList{

    display:flex;

    flex-direction:column;

    gap:12px;
}

.empty{

    height:100%;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    color:#f55151;

    margin-top:120px;
}

.empty span{

    font-size:50px;
}

.thumb{

    overflow:hidden;

    border-radius:18px;

    background:rgb(251, 91, 240);

    box-shadow:
    0 6px 15px rgba(0,0,0,.08);
}

.thumb img{

    width:100%;

    display:block;
}

/* ================= BUTTONS ================= */

.action-bar{

    margin-top:25px;

    display:flex;

    justify-content:center;

    gap:15px;

    flex-wrap:wrap;
}

.action-bar button,
.action-bar a{

    min-width:160px;

    height:55px;

    border:none;

    border-radius:18px;

    background:
    linear-gradient(
    135deg,
    #82c1fc,
    #ff6db2
    );

    color:white;

    font-size:15px;

    font-weight:600;

    text-decoration:none;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    transition:.3s;
}

.action-bar button:hover,
.action-bar a:hover{

    transform:translateY(-3px);

    box-shadow:
    0 10px 25px rgba(255,105,180,.35);
}

/* ================= BOTTOM ================= */

.bottom-section{

    margin-top:30px;

    display:grid;

    grid-template-columns:2fr 1fr;

    gap:25px;
}

/* ================= RESULT ================= */

.result-section{

    background:
    rgba(255,255,255,.35);


    border-radius:30px;

    padding:25px;
}

.result-section h2{

    margin-bottom:15px;

    color:#444;
}

#canvas{

    display:block;

    margin:auto;

    max-width:350px;

    width:100%;

    border-radius:25px;



    box-shadow:
    0 15px 35px rgba(0,0,0,.15);
}

/* ================= EDIT PANEL ================= */

.edit-panel{

    background:
    rgba(255,255,255,.35);


    border-radius:30px;

    padding:20px;

    display:flex;

    flex-direction:column;

    gap:15px;
}

.edit-group{

    background:white;

    border-radius:20px;

    padding:15px;
}

.edit-group h3{

    margin-bottom:12px;

    color:#444;
}

.edit-group button{

    padding:10px 14px;

    border:none;

    border-radius:12px;

    margin:4px;

    background:#f2f2f2;

    cursor:pointer;

    transition:.3s;
}

.edit-group button:hover{

    background:#ef7bea;

    color:white;
}

.edit-group button.active{

    background:hsl(282, 75%, 84%);

    color:white;
}

/* ================= CAPTION ================= */

.caption-row{

    display:flex;

    gap:10px;
}

.caption-row input{

    flex:1;

    padding:12px;

    border:none;

    border-radius:12px;

    background:#f5f5f5;

    outline:none;
}

#captionBtn{

    padding:12px 18px;

    border:none;

    border-radius:12px;

    background:
    linear-gradient(
    135deg,
    #bf82fc,
    #f18cfa
    );

    color:white;

    cursor:pointer;
}

/* ================= FLOATING ICONS ================= */

.floating{

    position:fixed;

    font-size:35px;

    pointer-events:none;

    animation:float 6s ease-in-out infinite;
}

.deco1{
    top:8%;
    left:5%;
}

.deco2{
    top:10%;
    right:5%;
}

.deco3{
    bottom:10%;
    left:5%;
}

.deco4{
    bottom:10%;
    right:5%;
}

@keyframes float{

    0%,100%{
        transform:translateY(0);
    }

    50%{
        transform:translateY(-18px);
    }
}

/* ================= RESPONSIVE ================= */

@media(max-width:1000px){

    .top-section,
    .bottom-section{

        grid-template-columns:1fr;
    }

    .container{

        width:100%;
    }

    .camera-card,
    .preview-section{

        height:auto;
    }

    .header h1{

        font-size:42px;
    }
}



/* ================= LOGIN ADMIN ================= */
.admin-login{
    position:absolute;
    top:35px;
    right:60px;
}

.admin-login a{

    text-decoration:none;
    color:#7b68ee;

    background:white;

    padding:10px 18px;

    border-radius:25px;

    font-weight:600;

    box-shadow:0 5px 15px rgba(0,0,0,.15);

    transition:.3s;

}

.admin-login a:hover{

    background:#7b68ee;
    color:white;

}
