:root {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #ffffff;
    --green: #00e676;
    --red: #ff5252;
    --blue: #2979ff;
    --cyan: #00e5ff;
    --grey: #757575;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Courier New', Courier, monospace; /* Spy feel */
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* HEADER */
header {
    background: #000;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    position: sticky; top: 0; z-index: 10;
    border-bottom: 2px solid var(--grey);
}
.title { font-size: 1.2rem; font-weight: bold; letter-spacing: 2px; }
.badge { font-size: 0.8rem; padding: 4px 8px; border-radius: 4px; font-weight: bold; background: var(--grey); color: #000; }
#admin-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 10px; }

/* GRID */
main { padding: 15px; padding-bottom: 80px; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsive */
    gap: 10px;
}
.card {
    background: var(--card);
    border: 1px solid #333;
    border-radius: 8px;
    height: 100px; /* Thumb size */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    position: relative;
    word-break: break-word;
    padding: 5px;
}
.card:active { background: #333; }
.card.dead { opacity: 0.5; border: 1px solid var(--red); color: var(--red); text-decoration: line-through; }
.card.add-btn { border: 2px dashed var(--grey); color: var(--grey); font-size: 2rem; }
.del-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--red); color: white;
    width: 24px; height: 24px; border-radius: 50%;
    line-height: 24px; text-align: center;
    font-size: 0.8rem; z-index: 5;
}

/* ADMIN DRAWER */
#admin-panel {
    position: fixed; top: 0; right: -100%;
    width: 100%; height: 100%;
    background: #000;
    z-index: 100;
    transition: right 0.3s ease;
    display: flex; flex-direction: column;
}
#admin-panel.open { right: 0; }
.admin-header {
    height: 60px; padding: 0 15px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--grey);
}
.close-x { background: none; border: none; color: white; font-size: 2rem; padding: 10px; }
.scroll-content { flex: 1; overflow-y: auto; padding: 20px; }
.section-label { color: var(--grey); font-size: 0.8rem; margin-top: 20px; margin-bottom: 10px; border-bottom: 1px solid #333; }

/* CONTROLS */
.btn {
    border: none; border-radius: 6px;
    font-weight: bold; font-family: inherit;
    padding: 12px; margin-bottom: 10px;
    width: 100%; font-size: 1rem;
    text-transform: uppercase;
}
.btn-large { padding: 18px; font-size: 1.2rem; }
.btn-green { background: var(--green); color: black; }
.btn-red { background: var(--red); color: white; }
.btn-blue { background: var(--blue); color: white; }
.btn-cyan { background: var(--cyan); color: black; }
.btn-grey { background: var(--grey); color: white; }

.input-group { display: flex; gap: 5px; margin-bottom: 10px; }
input, select, textarea {
    background: #111; color: white; border: 1px solid var(--grey);
    padding: 10px; width: 100%; font-family: inherit; font-size: 1rem;
    box-sizing: border-box;
}
#log-viewer { height: 150px; font-size: 0.7rem; white-space: pre; overflow-x: scroll; }

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal {
    background: var(--card); border: 1px solid var(--green);
    width: 85%; max-width: 400px;
    padding: 20px; border-radius: 10px;
}
.modal-btns { display: flex; gap: 10px; margin-top: 20px; }
.modal-btns.vertical { flex-direction: column; }
.hint { color: var(--grey); font-size: 0.8rem; }

/* DOSSIER STYLES */
.dossier { border: 2px solid var(--red); }
.stamp { color: var(--red); border: 2px solid var(--red); display: inline-block; padding: 5px; transform: rotate(-5deg); margin: 0 auto; display: block; width: fit-content; margin-bottom: 20px;}
.dossier-row { margin-bottom: 15px; }
.dossier-row label { color: var(--grey); display: block; font-size: 0.8rem; }
.target-text { color: var(--red); font-size: 1.5rem; font-weight: bold; }
.action-text { color: var(--cyan); font-size: 1.1rem; font-style: italic; margin-top: 5px; }
#winner-banner {
    background: var(--green); color: black; padding: 20px;
    text-align: center; font-size: 1.5rem; font-weight: bold;
    margin-bottom: 20px; border-radius: 8px;
}
