body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid #e74c3c;
}

h1 {
    background-color: #e74c3c;
    color: white;
    margin: 0;
    padding: 20px;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 1px;
}

.game-board {
    padding: 20px;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 2px solid #e74c3c;
    table-layout: fixed;
}

th {
    background-color: #ffebea;
    border: 1px solid #e74c3c;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    color: #e74c3c;
    font-size: 14px;
}

th:first-child {
    width: 15%;
}

th:nth-child(7) {
    width: 10%;
}

th:not(:first-child):not(:nth-child(7)) {
    width: 15%;
}

td {
    border: 1px solid #e74c3c;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    background: white;
    transition: all 0.2s ease;
}

.label {
    background-color: #ffebea;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.1;
}

.label small {
    font-size: 10px;
    font-weight: normal;
}

.cell, .bonus-cell, .sum-cell, .bonus-sum-cell {
    min-height: 35px;
    cursor: pointer;
    position: relative;
    background-color: white;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 16px;
}

.bonus-sum-cell {
    background-color: #f0f8ff;
    cursor: default;
    border-left: 2px solid #667eea;
}

.empty-cell {
    background-color: white;
    cursor: default;
    border-left: 1px solid #e74c3c;
}

.cell:hover, .bonus-cell:hover {
    background-color: #f8f8f8;
}

.cell.filled, .bonus-cell.filled, .total-cell.filled {
    background-color: #e8f5e8;
    color: #2d5016;
    cursor: default;
}

.cell.crossed, .bonus-cell.crossed {
    background-color: #ffe6e6;
    cursor: default;
}

.cell.crossed::before, .bonus-cell.crossed::before {
    content: "✗";
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cell.disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.5;
    color: #999;
}

.bonus-row {
    background-color: #fff3e0;
}

.bonus-row .label {
    background-color: #ffcc80;
    color: #d84315;
}

.total-row {
    background-color: #ffe6e6;
}

.total-row .label {
    background-color: #ffcccc;
    color: #c62828;
    font-weight: bold;
}

.controls {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.grand-total {
    font-size: 24px;
    color: #e74c3c;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    display: inline-block;
    min-width: 200px;
}

button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #c0392b;
}

button:active {
    background-color: #a93226;
}

.input-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.input-dialog-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 300px;
    border: 2px solid #e74c3c;
}

.input-dialog h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.input-dialog input {
    width: 100px;
    padding: 10px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #e74c3c;
    border-radius: 5px;
    margin: 15px;
}

.input-dialog input:focus {
    outline: none;
    border-color: #c0392b;
}

.input-dialog button {
    margin: 5px;
    min-width: 80px;
    padding: 10px 16px;
    font-size: 14px;
}

.input-dialog .cancel-btn {
    background-color: #6c757d;
}

.input-dialog .cancel-btn:hover {
    background-color: #5a6268;
}

.input-dialog .cross-btn {
    background-color: #dc3545;
}

.input-dialog .cross-btn:hover {
    background-color: #c82333;
}

.column-indicator {
    font-size: 12px;
    margin-top: 5px;
    color: #666;
}

.column-down .column-indicator::after {
    content: " (↓ samo)";
}

.column-up .column-indicator::after {
    content: " (↑ samo)";
}

/* SVG Dice Styles */
.dice-svg {
    width: 25px;
    height: 25px;
    display: inline-block;
}

.dice-dot {
    fill: #e74c3c;
}

.dice-border {
    fill: white;
    stroke: #e74c3c;
    stroke-width: 2;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        margin: 0;
        border-radius: 5px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 1.8em;
        padding: 15px;
    }
    
    .game-board {
        padding: 15px;
    }
    
    table {
        font-size: 12px;
    }
    
    .label {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .dice-svg {
        width: 25px;
        height: 25px;
    }
    
    .cell, .bonus-cell, .total-cell {
        min-height: 30px;
        padding: 6px 4px;
        font-size: 13px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    th {
        font-size: 11px;
        padding: 8px 6px;
    }
    
    .input-dialog-content {
        min-width: 280px;
        padding: 20px;
        margin: 15px;
    }
    
    .input-dialog input {
        width: 80px;
        font-size: 16px;
    }
    
    button {
        padding: 10px 16px;
        font-size: 14px;
    }
}