* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 2px solid #ffd700;
}

h1 {
    color: #ffd700;
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 5px;
}

.subtitle {
    color: #aaa;
    font-size: 1rem;
    font-style: italic;
}

.game-info {
    margin-bottom: 20px;
}

.info-panel {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid #444;
}

.stat {
    display: flex;
    gap: 10px;
    align-items: center;
}

.stat .label {
    color: #aaa;
    font-size: 0.9rem;
}

.stat .value {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1rem;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    margin-bottom: 20px;
}

.game-board {
    display: grid;
    gap: 4px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 2px solid #333;
    aspect-ratio: 1;
    max-height: 600px;
}

.cell {
    position: relative;
    background: #2a2a3e;
    border: 1px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.2s;
}

.cell-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

.cell.road {
    background: #3a3a4e;
}

.cell.wall {
    background: #555;
    border-color: #666;
}

.cell.evidence {
    background: #2d4a2d;
    border-color: #4a7c59;
    box-shadow: 0 0 10px rgba(74, 124, 89, 0.5);
}

.cell.hint {
    background: #3a3a1e;
    border-color: #7a7a3e;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.cell.culprit {
    background: #4a1e1e;
    border-color: #7a3e3e;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    animation: pulse 1.5s infinite;
}

.cell.start {
    background: #1e3a4a;
    border-color: #3e6a7a;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
    }
}

.player {
    position: absolute;
    font-size: 2.5rem;
    animation: playerPulse 1s infinite;
    z-index: 10;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

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

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}

.panel-section h3 {
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.evidence-list {
    max-height: 200px;
    overflow-y: auto;
}

.evidence-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #4a7c59;
}

.evidence-icon {
    font-size: 1.5rem;
}

.evidence-details {
    flex: 1;
}

.evidence-name {
    font-weight: bold;
    color: #ffd700;
    font-size: 0.9rem;
}

.evidence-desc {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

.empty-message {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.suspect-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suspect {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid #666;
    transition: all 0.3s;
}

.suspect.culprit {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.suspect-name {
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 5px;
}

.suspect-info {
    font-size: 0.85rem;
    color: #aaa;
}

.deduce-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.deduce-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.deduce-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.controls {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid #444;
}

.controls p {
    color: #aaa;
    margin-bottom: 10px;
}

.control-btn {
    padding: 10px 30px;
    background: #444;
    color: #fff;
    border: 1px solid #666;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.control-btn:hover {
    background: #555;
    border-color: #777;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8rem;
}

.modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
}

.suspect-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.suspect-btn {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.suspect-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateX(5px);
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-btn {
    padding: 10px 30px;
    background: #ffd700;
    color: #1a1a2e;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

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

.success {
    color: #4af;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
}

.error {
    color: #f44;
    font-weight: bold;
    text-align: center;
    font-size: 1.1rem;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .game-container {
        grid-template-columns: 1fr;
    }

    .game-board {
        max-height: 500px;
    }

    h1 {
        font-size: 2rem;
    }
}

/* スクロールバーのスタイリング */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}
