/* Schlangen und Leitern Styles */

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    min-height: 100vh;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-btn, .help-btn {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.back-btn:hover, .help-btn:hover {
    background: #FF5252;
}

.game-header h1 {
    margin: 0;
    color: #4A90E2;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-main {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 20px;
}

/* Sidebar */
.game-sidebar {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: fit-content;
}

.current-position, .current-letter {
    margin-bottom: 20px;
}

.current-position span, .current-letter span {
    display: block;
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.position-display, .letter-display {
    width: 60px;
    height: 60px;
    background: #4A90E2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.letter-display {
    background: #4ECDC4;
    animation: letterPulse 2s ease-in-out infinite;
}

@keyframes letterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.game-btn {
    background: #4ECDC4;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.game-btn:hover:not(:disabled) {
    background: #45B7B8;
    transform: translateY(-2px);
}

.game-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Dice */
.dice-container {
    display: flex;
    justify-content: center;
}

.dice {
    background: white;
    border: 3px solid #4A90E2;
    border-radius: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.dice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.dice.rolling {
    animation: diceRoll 0.6s ease-in-out;
}

@keyframes diceRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
}

.dice-face {
    font-size: 24px;
    font-weight: bold;
    color: #4A90E2;
}

/* Game Board */
.board-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(10, 60px);
    grid-template-rows: repeat(10, 60px);
    gap: 2px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.board-square {
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    transition: all 0.3s;
    font-size: 10px;
    font-weight: bold;
    color: #666;
}

.board-square:nth-child(even) {
    background: #f8f9fa;
}

.board-square.current {
    background: #FFD700;
    border-color: #FF6B6B;
    transform: scale(1.1);
    z-index: 5;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

.square-number {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.square-letter {
    font-size: 16px;
    font-weight: bold;
    color: #4A90E2;
}

/* Snakes and Ladders */
.snake {
    position: absolute;
    z-index: 3;
    font-size: 24px;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ladder {
    position: absolute;
    z-index: 3;
    font-size: 20px;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.snake-path, .ladder-path {
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.snake-path {
    border: 3px dashed #FF6B6B;
    border-radius: 20px;
}

.ladder-path {
    border: 3px solid #8B4513;
    border-radius: 5px;
}

/* Raccoon */
.raccoon {
    position: absolute;
    font-size: 40px;
    z-index: 10;
    transition: all 0.8s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: raccoonBreathe 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes raccoonBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.raccoon.moving {
    animation: raccoonMove 0.8s ease-in-out;
}

@keyframes raccoonMove {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.raccoon.sliding {
    animation: raccoonSlide 1.2s ease-in-out;
}

@keyframes raccoonSlide {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.2) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.raccoon.climbing {
    animation: raccoonClimb 1.2s ease-in-out;
}

@keyframes raccoonClimb {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.2) rotate(10deg); }
    60% { transform: scale(1.1) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Status Message */
.status-message {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #4A90E2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

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

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalShow 0.3s ease-out;
}

@keyframes modalShow {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    background: #4A90E2;
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    text-align: center;
    line-height: 1.6;
}

.modal-body ul {
    text-align: left;
    margin: 15px 0;
}

.modal-body li {
    margin: 8px 0;
}

.modal-icon {
    font-size: 64px;
    margin: 20px 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.modal-footer {
    padding: 20px 30px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    background: #4ECDC4;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
}

.modal-btn:hover {
    background: #45B7B8;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-main {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }
    
    .game-board {
        grid-template-columns: repeat(10, 50px);
        grid-template-rows: repeat(10, 50px);
    }
    
    .board-square {
        width: 50px;
        height: 50px;
        font-size: 9px;
    }
    
    .square-number {
        font-size: 10px;
    }
    
    .square-letter {
        font-size: 14px;
    }
    
    .raccoon {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    .game-main {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-sidebar {
        order: 2;
        padding: 15px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        text-align: center;
    }
    
    .game-controls {
        grid-column: span 3;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .dice-container {
        grid-column: span 3;
    }
    
    .game-board {
        grid-template-columns: repeat(10, 40px);
        grid-template-rows: repeat(10, 40px);
        gap: 1px;
        padding: 8px;
    }
    
    .board-square {
        width: 40px;
        height: 40px;
        font-size: 8px;
    }
    
    .square-number {
        font-size: 9px;
    }
    
    .square-letter {
        font-size: 12px;
    }
    
    .raccoon {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 10px;
    }
    
    .game-header h1 {
        font-size: 20px;
    }
    
    .game-board {
        grid-template-columns: repeat(10, 32px);
        grid-template-rows: repeat(10, 32px);
        padding: 5px;
    }
    
    .board-square {
        width: 32px;
        height: 32px;
        font-size: 7px;
    }
    
    .square-number {
        font-size: 8px;
    }
    
    .square-letter {
        font-size: 10px;
    }
    
    .raccoon {
        font-size: 24px;
    }
}