body{
    margin:0;
    background:#f2f2f2;
    font-family:'Segoe UI', sans-serif;
}

.autofill-trap{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

/* ===== TOP BAR ===== */
.topbar{
    padding:15px 25px;
    background:#1f1f1f;
    color:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.top-actions{ 
    display:flex; 
    align-items: center;
    gap:12px; 
}
.home-btn {
    all: unset;
    padding: 10px 16px;
    background-color: #333;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.home-btn:hover {
    background-color: #555;
}

.add-btn,
.login-btn,
.logout-btn{
    padding:10px 20px;
    border:none;
    border-radius:10px;
    font-weight:bold;
    cursor:pointer;
}

.add-btn{ background:#ffeb3b; }
.login-btn{ background:black; color:white; }
.logout-btn{ background:#444; color:white; }

/* ===== POPUP ===== */
.popup{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.popup-box {
    max-height: 85vh;        /* fit within screen */
    overflow-y: auto;        /* enable scrolling */
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 400px;            /* or whatever you use */
}

.popup-input,
.popup textarea{
    width:100%;
    padding:10px;
    margin-bottom:10px;
    border-radius:10px;
    border:2px solid #ddd;
}

.popup textarea{ height:120px; }

.image-upload{
    cursor:pointer;
    font-size:14px;
}

.image-preview{
    display:none;
    width:100%;
    margin-top:10px;
    border-radius:10px;
}

/* ===== NOTES GRID (NO STRETCH) ===== */
#notesContainer{
    display:grid;
    grid-template-columns:repeat(auto-fill,250px);
    gap:15px;
    padding:20px;
    align-items:start;
}

.note{
    background:#fff8b5;
    padding:15px;
    border-radius:10px;
    width:250px;
    box-sizing:border-box;
}

.note-image{
    width:100%;
    margin-top:8px;
    border-radius:8px;
    display:block;
}

.stars{
    color:#f5b50a;
    font-size:18px;
}

.star{
    font-size:24px;
    color:#ccc;
    cursor:pointer;
}

.star.active{ color:#f5b50a; }

.note-footer{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:10px;
}

.note-date{
    font-size:12px;
    color:#777;
}


/* ===== LOGIN ===== */
.login-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    justify-content:center;
    align-items:center;
}

.login-box{
    background:white;
    padding:25px;
    width:360px;
    border-radius:14px;
    text-align:center;
    position:relative;
}

.login-box input{
    width:100%;
    padding:10px;
    margin-bottom:10px;
}

.login-box button{
    width:100%;
    padding:10px;
    background:#ffeb3b;
    border:none;
    font-weight:bold;
}

.close-btn{
    position:absolute;
    top:10px;
    right:12px;
    cursor:pointer;
}
.review-image{
    width:200px;
    height:150px;
    object-fit:cover;
    border-radius:10px;
    margin-top:10px;
}