/* ==========================================
   PART 2: GLOBAL STYLES & MAIN UI (UPDATED)
   ========================================== */

:root {
    --bg: #1a1a1a;
    --sheet: #222222;
    --btn-base: #f2f2f2;
    --btn-hover: #ffffff;
    --monster-red: #ff0000;
    --text-main: #ffffff;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg); 
    color: var(--text-main); 
    margin: 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh; 
}

.container { 
    width: 100%; 
    max-width: 500px; 
    padding: 40px 20px; 
    text-align: center; 
}

.main-logo { width: 300px; height: auto; margin-bottom: 30px; }

h1 { font-size: 2rem; letter-spacing: 2px; margin-bottom: 40px; font-weight: 900; }
h1 span { color: var(--monster-red); }

.btn {
    background: var(--btn-base); 
    color: #111; 
    border: none; 
    padding: 18px;
    border-radius: 12px; 
    font-weight: 900; 
    font-size: 1.1rem; 
    cursor: pointer;
    width: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 12px; 
    margin: 15px 0; 
    transition: all 0.3s ease-in-out; 
    text-transform: uppercase;
}

.btn:hover { 
    background: var(--btn-hover); 
    transform: translateY(-3px); 
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.6); 
}

.card { 
    background: var(--sheet); 
    border-radius: 28px; 
    padding: 35px; 
    border: 1px solid #333; 
}

input[type="text"] {
    width: 100%; 
    padding: 20px; 
    border-radius: 12px; 
    border: 2px solid #444;
    background: #000; 
    color: var(--monster-red); 
    text-align: center;
    font-size: 2.2rem; 
    font-weight: 900; 
    margin: 20px 0; 
}

/* File List & Items */
.file-list { 
    margin-top: 20px; 
    text-align: left; 
    background: #111; 
    border-radius: 12px; 
    padding: 10px; 
    max-height: 200px; 
    overflow-y: auto; 
}

.file-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px; 
    border-bottom: 1px solid #222; 
    font-size: 0.85rem; 
}

.file-item.active { color: var(--monster-red); font-weight: bold; background: #1a1a1a; }
.file-item.done { color: #44ff44; opacity: 0.7; }

/* Stats & Labels */
.stats-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-top: 20px; 
    font-size: 0.8rem; 
    color: #aaa; 
    text-align: left; 
}

.stat-box { 
    background: #111; 
    padding: 10px; 
    border-radius: 8px; 
    border: 1px solid #333; 
}

.stat-label { 
    display: block; 
    color: var(--monster-red); 
    font-weight: bold; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
}

/* Progress Bar */
.prog-container { 
    height: 16px; 
    background: #333; 
    border-radius: 8px; 
    margin-top: 20px; 
    overflow: hidden; 
    position: relative; 
}

.prog-bar { 
    height: 100%; 
    background: var(--monster-red); 
    width: 0%; 
    transition: width 0.1s; 
}

.prog-text { 
    position: absolute; 
    width: 100%; 
    text-align: center; 
    font-size: 0.7rem; 
    font-weight: bold; 
    line-height: 16px; 
    color: white; 
}

/* QR Code */
#qrcode { 
    background: white; 
    padding: 15px; 
    border-radius: 15px; 
    display: inline-block; 
    margin: 20px 0; 
    min-height: 160px; 
    min-width: 160px;
}

#qrcode img { margin: 0 auto; }

.hidden { display: none; 
}
/* ==========================================
   MOBILE OVERRIDES (TOUCH-FIRST)
   ========================================== */

@media (max-width: 768px) {

    /* Prevent hover effects on touch devices */
    .btn:hover {
        background: var(--btn-base);
        transform: none;
        box-shadow: none;
    }

    /* General layout tightening */
    body {
        font-size: 16px;
    }

    .container {
        padding: 24px 16px;
        max-width: 100%;
    }

    /* Logo scaling */
    .main-logo {
        width: 220px;
        margin-bottom: 20px;
    }

    /* Headings */
    h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
        margin-bottom: 24px;
    }

    /* Buttons: bigger & simpler */
    .btn {
        padding: 20px;
        font-size: 1rem;
        border-radius: 14px;
        gap: 10px;
        margin: 14px 0;
        box-shadow: none;
        transition: background 0.2s ease;
    }

    /* Cards */
    .card {
        padding: 22px;
        border-radius: 20px;
    }

    /* Input fields */
    input[type="text"] {
        font-size: 1.6rem;
        padding: 16px;
        margin: 16px 0;
        border-radius: 14px;
    }

    /* File list: more finger-friendly */
    .file-list {
        max-height: 160px;
        padding: 8px;
    }

    .file-item {
        padding: 12px 8px;
        font-size: 0.9rem;
    }

    /* Stats grid: still 2 columns, more spacing */
    .stats-grid {
        gap: 12px;
        font-size: 0.75rem;
    }

    .stat-box {
        padding: 12px;
        border-radius: 10px;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Progress bar: taller for visibility */
    .prog-container {
        height: 20px;
        border-radius: 10px;
    }

    .prog-text {
        font-size: 0.75rem;
        line-height: 20px;
    }

    /* QR code scaling */
    #qrcode {
        padding: 12px;
        border-radius: 12px;
        min-width: 140px;
        min-height: 140px;
    }

    /* Disable text selection on buttons (nice mobile feel) */
    .btn,
    .btn * {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }
}


/* Container for the requirements */
.requirement-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: left;
    font-size: 14px;
    color: #444;
}

/* Titles inside the card */
.requirement-card strong {
    color: #222;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* The Red Link */
.requirement-link {
    color: #dc3545; /* Nice Red */
    text-decoration: none;
    font-weight: bold;
    word-break: break-all; /* Important for mobile */
}

.requirement-link:hover {
    text-decoration: underline;
}

/* Spacing for paragraphs */
.requirement-card p {
    margin: 0 0 12px 0;
}

.requirement-card p:last-child {
    margin-bottom: 0;
}