/* Base Reset */
body {
    margin: 0;
    overflow: hidden;
    background-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

video {
    object-fit: cover;
}

/* Original Loading / Scanning UI */
#custom-loading-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(20, 20, 20, 0.95);
    z-index: 9999; display: flex; flex-direction: column;
    justify-content: center; align-items: center; color: white;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 60px; height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff; border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

#custom-scanning-overlay {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8); color: #fff; padding: 12px 24px;
    border-radius: 30px; font-size: 16px; font-weight: 500;
    z-index: 9998; transition: opacity 0.3s ease; white-space: nowrap;
}

.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* ========================================= */
/* NEW: Modal Overlay Styles                 */
/* ========================================= */
#info-modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000; /* Above everything */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: #fff;
    color: #333;
    width: 85%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow-y: auto; /* Allows scrolling if text is long */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

#close-modal-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
}

#modal-title {
    margin-top: 0;
    font-size: 22px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.modal-images img {
    width: 100%;
    border-radius: 8px;
    background: #eee;
}

#modal-text {
    font-size: 16px;
    line-height: 1.5;
    color: #444;
}

.a-canvas {
    pointer-events: auto !important;
}