body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
}

.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.status-bar {
    background: #2a2a2a;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3a3a3a;
    flex-shrink: 0;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-label {
    font-size: 14px;
    color: #999;
}

.time-value {
    font-size: 24px;
    font-weight: bold;
    color: #4CAF50;
}

.stats {
    display: flex;
    gap: 24px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
}

.stat-icon {
    font-size: 20px;
}

.story-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    padding: 14px 18px;
    border-radius: 8px;
    line-height: 1.5;
    max-width: 85%;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dm-message {
    background: #2a2a2a;
    align-self: flex-start;
    border-left: 3px solid #4CAF50;
}

.player-message {
    background: #1e3a5f;
    align-self: flex-end;
    border-right: 3px solid #64B5F6;
}

.roll-message {
    background: #3a2a1a;
    align-self: center;
    border: 1px solid #FF9800;
    font-family: monospace;
    text-align: center;
    max-width: fit-content;
}

.input-container {
    padding: 20px;
    background: #2a2a2a;
    border-top: 2px solid #3a3a3a;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

#actionInput {
    flex: 1;
    padding: 14px;
    background: #1a1a1a;
    border: 2px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 16px;
}

#actionInput:focus {
    outline: none;
    border-color: #4CAF50;
}

#submitBtn {
    padding: 14px 32px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#submitBtn:hover {
    background: #45a049;
}

#submitBtn:active {
    transform: scale(0.98);
}

#submitBtn:disabled {
    background: #555;
    cursor: not-allowed;
}

.dice-roller {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
}

.dice-roller.rolling {
    animation: diceRoll 1s ease-out;
}

@keyframes diceRoll {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(360deg) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(720deg) scale(0.5);
    }
}

@media (max-width: 768px) {
    .status-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .message {
        max-width: 95%;
    }

    .stats {
        gap: 16px;
    }
}

