* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: #222;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 70px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px;

    background: white;
    border-bottom: 1px solid #ddd;

    z-index: 100;
}

#logo {
    font-size: 28px;
}

#searchContainer {
    flex: 1;

    display: flex;
    align-items: center;

    background: #eee;
    border-radius: 12px;

    padding: 8px 10px;
}

#search {
    flex: 1;

    border: none;
    background: none;
    outline: none;

    margin-left: 8px;

    font-size: 16px;
}

#btnClear {
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
}

main {
    padding-top: 90px;
    padding-bottom: 90px;
}

#welcome {
    text-align: center;
    padding: 40px 20px;
}

.hint {
    margin: 20px 0;
    font-size: 20px;
}

#itemCount {
    margin-top: 40px;
    color: #666;
}

#results {
    padding: 10px;
}

footer {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    height: 70px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 10px;

    background: white;
    border-top: 1px solid #ddd;

    z-index: 100;
}

footer button {
    font-size: 28px;
    border: none;
    background: none;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

#loginOverlay {
    position: fixed;
    inset: 0;

    display: none;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.5);

    z-index: 9999;
}

.dialog {
    background: white;

    padding: 20px;

    border-radius: 16px;

    min-width: 280px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.dialog h1 {
    margin-bottom: 20px;
    text-align: center;
}

.dialog input {
    width: 100%;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 10px;

    margin-bottom: 15px;
}

.dialog button {
    width: 100%;

    padding: 12px;

    border: none;
    border-radius: 10px;

    background: #222;
    color: white;

    cursor: pointer;
}

.resultItem {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px;
    margin-bottom: 8px;

    background: white;
    border-radius: 12px;
}

.thumb {
    width: 50px;
    height: 50px;

    object-fit: cover;

    border-radius: 8px;
}

.resultLabel {
    flex: 1;
}

#itemOverlay{
    position:fixed;
    inset:0;

    background:rgba(0,0,0,.5);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:5000;
}

.itemDialog{
    position:relative;

    width:90%;
    max-width:500px;

    max-height:90vh;

    overflow:auto;
}

.itemImage{
    width:100%;

    border-radius:12px;

    margin-bottom:15px;
}

.overlayButtons{
    display:flex;
    justify-content:space-between;
    margin-bottom:15px;
}

.overlayButtons button{
    border:none;
    background:none;
    font-size:28px;
}

#itemMenu{
    display:flex;
    flex-direction:column;

    gap:8px;

    margin-bottom:15px;
}

#itemMenu button{
    padding:10px;

    border:none;

    border-radius:10px;

    background:#eee;
}