:root {
    --bg-color: #E3F2FD; /* Light Blue */
    --text-color: #0D47A1; /* Dark Blue */
    --primary: #D32F2F; /* Red */
    --secondary: #0D47A1; /* Dark Blue */
    --accent: #FBC02D; /* Yellow */
    --success: #388E3C; /* Green */
    --card-bg: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: #fff;
    padding: 10px 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

h1 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 0;
    font-weight: 700;
}

.header-controls button {
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 5px;
    transition: all 0.2s;
}

.header-controls button:hover {
    background: var(--secondary);
    color: #fff;
}

/* Container */
.container {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

/* Setup Styles */
.setup-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

h2 {
    color: var(--text-color);
    margin-top: 0;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

input[type="text"],
input[type="number"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fdfdfd;
}

/* Buttons */
.btn-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    margin-top: 20px;
    transition: transform 0.1s;
}

.btn-main:active {
    transform: translateY(2px);
}

.btn-secondary {
    background: transparent;
    border: none;
    color: var(--secondary);
    margin-top: 15px;
    cursor: pointer;
    text-decoration: underline;
}

/* Game Board */
.game-board {
    display: none;
    flex-direction: column;
    height: 100%;
}

.round-info {
    text-align: center;
    padding: 10px;
    background: #BBDEFB;
    color: var(--secondary);
    font-weight: bold;
    border-bottom: 1px solid #90CAF9;
}

.scoreboard {
    flex: 1;
    overflow: auto;
    position: relative;
    padding-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th {
    background: #f8f9fa;
    color: #7f8c8d;
    padding: 12px 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

td {
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    text-align: center;
    font-weight: 500;
}

.phase-cell {
    font-weight: bold;
    color: var(--secondary);
}

.score-cell {
    color: var(--primary);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal.visible {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.phase-headers {
    display: grid;
    grid-template-columns: 1fr 60px 80px;
    gap: 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.phase-headers > span:first-child {
    grid-column: 2;
}

.phase-headers > span:last-child {
    grid-column: 3;
}

.round-input-row {
    display: grid;
    grid-template-columns: 1fr 60px 80px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 8px;
}

.round-input-row .name-label {
    text-align: left;
    font-weight: bold;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.round-input-row input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--success);
}

.round-input-row input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
}

/* Force Footer Transparent */
.common-footer {
    background: transparent !important;
    box-shadow: none !important;
}
