/* style.css */
:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --bg-color: #f4f4f4;
    --text-color: #333;
    --card-bg: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0; padding: 0; line-height: 1.6;
}

.container {
    max-width: 800px; margin: 0 auto; padding: 20px;
    background: var(--card-bg); min-height: 100vh;
}

/* Typography & Forms */
h1 { font-size: 1.5rem; margin-top: 0; }
h2 { font-size: 1.2rem; }
p { font-size: 1rem; }

input, select, button {
    width: 100%; padding: 12px; margin-bottom: 15px;
    font-size: 16px; border: 1px solid #ccc; border-radius: 8px;
}

button {
    background-color: var(--primary); color: white; border: none;
    font-weight: bold; cursor: pointer; transition: background 0.2s;
}
button:hover { background-color: var(--primary-dark); }
.back-link { display: block; margin-bottom: 15px; color: var(--primary); text-decoration: none; font-weight: bold; }

/* Status Colors */
.cum-yes { background-color: #d4edda; color: #155724; font-weight: bold; }
.cum-no { background-color: #f8d7da; color: #721c24; font-weight: bold; }
.mult-increase { background-color: #fff3cd; border: 2px solid #ffecb5; }

/* Desktop Table Styling */
.table-responsive { width: 100%; overflow-x: auto; border: 1px solid #ddd; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 12px; border-bottom: 1px solid #ddd; text-align: center; }
th { background-color: #f8f9fa; }

/* Mobile Card Styling */
.roll-card {
    border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px;
    background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); overflow: hidden;
}
.card-top {
    display: flex; justify-content: space-between; padding: 10px 15px;
    background-color: #f8f9fa; border-bottom: 1px solid #eee; font-size: 0.9rem; color: #555;
}
.card-bottom { display: flex; text-align: center; }
.card-stat {
    flex: 1; padding: 10px 5px; border-right: 1px solid #eee;
    display: flex; flex-direction: column; justify-content: center;
}
.card-stat:last-child { border-right: none; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; color: #888; margin-bottom: 4px; }
.stat-value { font-weight: bold; font-size: 1rem; }
.rolled-val-highlight { background-color: #fff3cd; padding: 2px 6px; border-radius: 4px; border: 1px solid #ffecb5; font-weight: bold; }

/* VISIBILITY RULES */
.mobile-rolls { display: none !important; }
.desktop-rolls { display: block !important; }

@media (max-width: 768px) {
    .container { padding: 10px; }
    .mobile-rolls { display: block !important; }
    .desktop-rolls { display: none !important; }
}

@media (min-width: 769px) {
    .container { margin: 20px auto; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
    input, select, button { width: auto; }
    .btn-block { width: 100%; }
}
/* --- LOGIN PAGE FIX --- */
.login-container {
    max-width: 400px;
    margin: 50px auto; /* Centers it vertically and horizontally */
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Adds a nice floaty shadow */
    text-align: left;
}

/* Force inputs inside the login card to always be full width */
.login-container input {
    width: 100% !important;
    margin-bottom: 20px;
}

.login-container button {
    width: 100% !important;
    margin-bottom: 10px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary);
}
/* --- DASHBOARD IMPROVEMENTS --- */

/* Expandable Headers (<details>) */
.game-group {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #fff;
    overflow: hidden;
}

.game-group summary {
    background-color: #f8f9fa;
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* Hides default triangle in some browsers */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Triangle indicator */
.game-group summary::after {
    content: '+'; 
    font-size: 1.2em;
    font-weight: bold;
}
.game-group[open] summary::after {
    content: '-';
}

.game-list {
    padding: 15px;
    background: #fff;
}

/* Dashboard Game Card (Mobile) */
.game-card {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.game-card-top {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #fdfdfd;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: #666;
}

.game-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.btn-open {
    background-color: var(--primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Desktop Only List Row */
.desktop-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.desktop-row:last-child { border-bottom: none; }

/* VISIBILITY TOGGLES */
/* We reuse the logic from before, but specific classes for clarity */
.mobile-only { display: block; }
.desktop-only { display: none; }

@media (min-width: 769px) {
    .mobile-only { display: none; }
    .desktop-only { display: flex; }
}
