/* ---------------------------------------------------------
   GLOBAL RESET + BASE
--------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

body {
    background: #f6f7fb;
    padding: 24px;
    color: #333;
}

h1, h2, h3 {
    font-weight: 600;
}

/* ---------------------------------------------------------
   DROP ZONE (single + batch)
--------------------------------------------------------- */
#drop-zone {
    width: 100%;
    padding: 40px;
    border: 2px dashed #6c7bff;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: 0.25s ease;
    color: #555;
    margin-bottom: 20px;
}

#drop-zone.dragover {
    background: #eef0ff;
    border-color: #4a5bff;
    color: #333;
}

/* ---------------------------------------------------------
   PREVIEW (single)
--------------------------------------------------------- */
#preview-img {
    margin-top: 20px;
    max-width: 340px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

/* ---------------------------------------------------------
   PREVIEW GRID (batch)
--------------------------------------------------------- */
#preview-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.preview-item {
    position: relative;
    width: 150px;
    height: 150px;
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    border: none;
    background: #ff4b4b;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

/* ---------------------------------------------------------
   RESULT CARD (single + batch)
--------------------------------------------------------- */
#result-container {
    margin-top: 24px;
}

.result-card, .history-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.result-card h3, .history-card h3 {
    margin-bottom: 10px;
}

/* ---------------------------------------------------------
   HISTORY PAGE
--------------------------------------------------------- */
#history-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.history-thumb img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

/* ---------------------------------------------------------
   BUTTONS
--------------------------------------------------------- */
button,
#analyze-btn {
    margin-top: 16px;
    padding: 12px 20px;
    border: none;
    background: #4a5bff;
    color: white;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover,
#analyze-btn:hover {
    background: #3646d6;
}

/* ---------------------------------------------------------
   DETAILS TAG
--------------------------------------------------------- */
details {
    margin-top: 10px;
    font-size: 14px;
}

details summary {
    cursor: pointer;
    font-weight: 600;
}

/* ---------------------------------------------------------
   LIGHTBOX (Fullscreen Image Viewer)
--------------------------------------------------------- */
.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 25, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-backdrop.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.25);
    animation: lightbox-fade 0.25s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 42px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

@keyframes lightbox-fade {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
