/* --- Global Reset & Basics --- */
* {
    box-sizing: border-box; /* Ensures padding doesn't widen elements */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Adwaita Sans, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
}

a {
    color: #2980b9;
    text-decoration: none;
}

/* --- The Main Card Container --- */
/* This centers content and makes it look like a "Card" */
.container {
    max-width: 600px;       /* Good for Desktop */
    width: 100%;            /* Good for Mobile */
    margin: 0 auto;         /* Centers it */
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- Forms & Inputs --- */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 8px 0 20px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px; /* 16px prevents iOS from zooming in on focus */
}

/* --- Buttons --- */
button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { opacity: 0.9; }

/* Action Buttons */
.btn-capture { background-color: #e74c3c; color: white; }
.btn-capture:hover { background-color: #c0392b; }

.btn-primary { background-color: #2980b9; color: white; }
.btn-report { background-color: #f39c12; color: white; }
.btn-danger { background-color: #c0392b; color: white; }

/* --- Dashboard Specifics --- */
.status-box {
    border: 2px solid #2c3e50;
    padding: 20px;
    background: #e8f6f3;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.current-holder {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2980b9;
    margin: 10px 0;
}

.defender-box {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 15px;
}

.report-box {
    border: 2px dashed #bdc3c7;
    padding: 15px;
    background-color: #fff9e6;
    border-radius: 6px;
    margin-top: 15px;
}

.winner-banner {
    background-color: #f1c40f;
    color: black;
    padding: 20px;
    border-radius: 8px;
    border: 4px solid #d35400;
    text-align: center;
    margin-bottom: 20px;
    animation: pop 0.5s ease-out;
}

@keyframes pop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th { background-color: #f8f9fa; }

/* --- Admin Danger Zone --- */
.danger-zone {
    border: 2px solid #e74c3c;
    background-color: #fadbd8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}
.danger-zone h3 { color: #c0392b; }
.danger-zone input { border: 1px solid #c0392b; }

/* --- Utility --- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.alert { color: #e74c3c; font-weight: bold; text-align: center; margin-bottom: 10px;}
.success { color: #27ae60; font-weight: bold; text-align: center; margin-bottom: 10px;}

/* --- Mobile Specific Overrides --- */
@media (max-width: 600px) {
    body { padding: 10px; }
    .container { padding: 15px; }
    h1 { font-size: 1.8rem; }
    th, td { padding: 8px; font-size: 0.9rem; }
}