/* =========================
   GLOBAL RESET MOBILE
========================= */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;

    font-family: Arial, sans-serif;
    background: #111;
    color: white;
}

/* Safe area iOS */
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* =========================
   APP ROOT
========================= */

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 10px;
    gap: 10px;
}

/* =========================
   PROGRESS BAR (TOP FIXED FEEL)
========================= */

#progress-wrapper {
    flex-shrink: 0;
    padding: 6px 8px;
}

#progress-text {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #fff;
}

#progress-bar {
    width: 100%;
    height: 10px;
    background: #333;
    border-radius: 999px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background: #4da3ff;
    transition: width 0.25s ease;
}

/* =========================
   IMAGE AREA (FULL FLEX)
========================= */

#card-container {
    flex: 1;
    min-height: 0;

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

    border-radius: 18px;
    overflow: hidden;

    background: #000;
}

/* IMAGE FIT FULLY */
#image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    user-select: none;
    -webkit-user-drag: none;
}

/* =========================
   BUTTONS FLOATING BOTTOM
========================= */

#buttons {
    flex-shrink: 0;

    display: flex;
    gap: 12px;

    padding: 10px 4px;

    position: sticky;
    bottom: 0;
}

/* BUTTON STYLE APP-LIKE */
button {
    flex: 1;

    padding: 16px;

    font-size: 18px;
    font-weight: bold;

    border: none;
    border-radius: 14px;

    cursor: pointer;

    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

/* OK BUTTON */
#ok {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

/* KO BUTTON */
#ko {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* =========================
   END MESSAGE FULL SCREEN
========================= */

#end-message {
    display: none;

    flex: 1;

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

    text-align: center;

    font-size: 22px;

    padding: 20px;

    color: white;
}
