/* Allgemeine Styles */
:root {
    --player1-color: #e63946;
    --player2-color: #1d3557;
    --board-dark: #8d6e63;
    --board-light: #d7ccc8;
    --point-color-light: #653827;
    --point-color-dark: #250c03;
    --board-border: #5d4037;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --header-bg: #eee;
    --accent-color: #01579b;
    --checker-size: 36px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

button {
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

button:hover {
    background-color: var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Container Styles */
.game-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Header Styles */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background-color: var(--header-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.game-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

.game-controls {
    display: flex;
    gap: 8px;
}

/* Spielstatus Styles */
.game-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.player {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.player-name {
    font-weight: bold;
    font-size: 1rem;
}

.player1 .player-name {
    color: var(--player1-color);
}

.player2 .player-name {
    color: var(--player2-color);
}

.player-score {
    font-size: 1.5rem;
    font-weight: bold;
}

.player-home-bar {
    width: 30px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Hilfeklassen */
.active-player {
    background-color: rgba(76, 175, 80, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--accent-color);
    transform: translateY(-2px);
}

.player1.active-player {
    background-color: rgba(230, 57, 70, 0.05);
    border-color: var(--player1-color);
}

.player2.active-player {
    background-color: rgba(29, 53, 87, 0.05);
    border-color: var(--player2-color);
}

/* Mittlere Bar für geschlagene Steine */
.captured-bar {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 650px;
    height: 40px;
    margin: 0 auto 10px auto;
    background-color: var(--board-border);
    border-radius: 6px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
    position: relative;
}

.bar-section {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 10px;
    position: relative;
    overflow: hidden;
}

.bar-section:first-child {
    border-right: 2px solid rgba(255, 255, 255, 0.2);
}

.bar-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    margin-right: 10px;
}

/* Änderungen für die Bar-Zähler */
.bar-counter {
    position: relative;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Spielsteine in der Bar */
.bar-section .checker {
    margin: 0 3px !important;
    position: relative !important;
    transform: scale(0.8);
}

/* Spieler-spezifische Farben */
.bar-player1 {
    background-color: rgba(230, 57, 70, 0.1);
}

.bar-player2 {
    background-color: rgba(29, 53, 87, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    height: 30px;
    width: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.setting {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Theme-spezifische Styles */
.theme-classic {
    /* Bereits definiert */
}

.theme-modern {
    --board-dark: #455a64;
    --board-light: #cfd8dc;
    --point-color-light: #455a64;
    --point-color-dark: #082c3c;
    --board-border: #263238;
}

.theme-wood {
    --board-dark: #795548;
    --board-light: #d7ccc8;
    --point-color-light: #795548;
    --point-color-dark: #4f1c0a;
    --board-border: #4e342e;
}

/* Spielstand-Anzeige */
.score-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    margin-left: 5px;
}

/* Gewinnbildschirm */
.win-content {
    text-align: center;
    padding: 20px 0;
}

.win-content p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        text-align: center;
    }
    
    .game-header h1 {
        font-size: 1.5rem;
    }
    
    .game-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .game-status {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .player {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        width: 130px;
        padding: 5px 10px;
    }
    
    .player-info {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    
    .player-home-bar {
        width: 20px;
        height: 50px;
        margin-left: 5px;
    }
    
    .dice-container {
        order: 3;
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin-top: 5px;
    }
    
    .captured-bar {
        height: 35px;
        margin-bottom: 8px;
    }
    
    .bar-label {
        font-size: 0.7rem;
        padding: 1px 4px;
    }
    
    .bar-counter {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 5px;
    }
    
    .game-header h1 {
        font-size: 1.3rem;
    }
    
    button {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .player {
        width: 120px;
        padding: 5px 8px;
    }
    
    .player-name {
        font-size: 0.8rem;
    }
    
    .player-score {
        font-size: 1rem;
        min-width: 24px;
        text-align: center;
    }
    
    .player-home-bar {
        width: 16px;
        height: 40px;
    }
    
    .game-status {
        margin-bottom: 10px;
    }
    
    .captured-bar {
        height: 30px;
        margin-bottom: 5px;
    }
    
    .bar-label {
        font-size: 0.65rem;
        padding: 1px 3px;
        margin-right: 5px;
    }
    
    .bar-section .checker {
        transform: scale(0.7);
        margin: 0 2px !important;
    }
}

/* Button-Stile für Icon-Buttons */
button .material-icons {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Fullscreen-Button Stile */
#fullscreen-btn {
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullscreen-btn.active {
    background-color: #3d8b40;
}

/* Im Fullscreen-Modus */
:fullscreen .game-container {
    background-color: var(--bg-color);
    padding: 15px;
    height: 100vh;
}

/* Vendor-spezifische Fullscreen-Selektoren */
:-webkit-full-screen .game-container {
    background-color: var(--bg-color);
    padding: 15px;
    height: 100vh;
}

:-moz-full-screen .game-container {
    background-color: var(--bg-color);
    padding: 15px;
    height: 100vh;
}

:-ms-fullscreen .game-container {
    background-color: var(--bg-color);
    padding: 15px;
    height: 100vh;
} 