body {
    display: block !important; 
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden;
    background-color: #000; /* Consistency with base.html */
}

/* 2. Standardize Main container to be full width */
main {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both;
}

/* 3. Game Container: Ensure it doesn't flex with footer */
#game-container {
    width: 100% !important;
    display: block !important;
    padding: 40px 0;
    box-sizing: border-box;
    clear: both;
}

#ytz-game-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #eee;
    background: #111;
    padding: 20px;
    border-radius: 8px;
    max-width: 900px;
    margin: 20px auto; /* Ensures centering and spacing from footer */
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

/* Buttons matching RTB style */
.ytz-btn {
    background-color: #1e40af; /* Blue 800 */
    color: #dbeafe; /* Blue 100 */
    border: 2px solid #60a5fa; /* Blue 400 */
    padding: 10px 15px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s, background-color 0.2s;
    margin: 5px;
}

.ytz-btn:hover:not(:disabled) {
    transform: scale(1.02);
    background-color: #2563eb;
}

.ytz-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.ytz-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #4b5563;
    background-color: #374151;
}

/* Dice Styling - UPDATED */
.dice-container {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    height: 70px;
}

.die {
    width: 60px;
    height: 60px;
    background-color: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    /* Removed shadow for flat look */
    border: 2px solid #cbd5e1; 
    transition: transform 0.1s, background-color 0.2s;
    user-select: none;
    
    /* Grid for Dots */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 6px;
    box-sizing: border-box;
}

.die.held {
    background-color: #007711; /* Green for held */
    border-color: #007711;
    transform: translateY(4px);
}

.die:active {
    transform: translateY(4px);
}

/* Dots (Pips) */
.pip {
    background-color: #0f172a; /* Dark Slate for dots */
    border-radius: 50%;
    width: 10px;
    height: 10px;
    place-self: center;
}

.die.held .pip {
    background-color: white; /* White dots on red die */
}

/* Scorecard Table */
.scorecard-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    font-size: 0.6rem;
}

table.scorecard {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #374151;
}

.scorecard th, .scorecard td {
    border: 1px solid #374151;
    padding: 8px 4px;
    text-align: center;
}

.scorecard th {
    background-color: #1f2937;
    color: #fbbf24;
}

.scorecard .category-label {
    text-align: left;
    padding-left: 10px;
    color: #9ca3af;
}

.score-cell {
    cursor: default;
}

.score-cell.potential {
    color: #60a5fa; /* Light Blue */
    cursor: pointer;
    background-color: rgba(37, 99, 235, 0.1);
}
.score-cell.potential:hover {
    background-color: rgba(37, 99, 235, 0.3);
}

.score-cell.filled {
    color: #ffffff;
}

.score-cell.zero {
    color: #ef4444; /* Red for scratched */
}

.active-col {
    background-color: rgba(251, 191, 36, 0.1); /* Yellow tint */
    border-left: 2px solid #fbbf24;
    border-right: 2px solid #fbbf24;
}

/* Animations */
@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shaking {
    animation: shake 0.5s;
}

/* Setup Screen Inputs */
.setup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    background: #1f2937;
    padding: 10px;
    border-radius: 6px;
}

select {
    background: #374151;
    color: white;
    padding: 5px;
    font-family: inherit;
    border: 1px solid #4b5563;
    border-radius: 4px;
}

.computer-indicator {
    color: #fbbf24;
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}