/* Game Screen Styles - Main gameplay interface */

.game-screen {
    padding: 6px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 4px;
    padding-top: 2px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.stat-badge {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.65em;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    flex: 0 0 auto;
}

.stat-badge.energy {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-badge.score {
    background: linear-gradient(135deg, #2196F3, #03A9F4);
}

.stat-badge.turns {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
}

.stat-badge.discards {
    background: linear-gradient(135deg, #9C27B0, #E91E63);
}

/* Target Section */
.target-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.target-label {
    font-weight: bold;
    color: #495057;
    font-size: 0.9em;
}

.target-score {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    font-weight: bold;
}

.progress-bar {
    background: #ddd;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Main Game Area */
.main-game-area {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}

/* Info Panel */
.info-panel {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    flex: 0 0 150px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: none;
}

.info-panel.show {
    display: block;
}

.info-panel h3 {
    color: #667eea;
    font-size: 0.9em;
    margin-bottom: 6px;
}

.info-kanji-large {
    font-size: 2.5em;
    color: #764ba2;
    text-align: center;
    margin: 8px 0;
}

.info-detail {
    font-size: 0.8em;
    margin: 4px 0;
    color: #495057;
}

.info-detail strong {
    color: #667eea;
}

.compound-hints {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
    max-height: 150px;
    overflow-y: auto;
}

.compound-hints::-webkit-scrollbar {
    width: 6px;
}

.compound-hints::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.compound-hints::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.compound-hints::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.compound-hint {
    font-size: 0.75em;
    color: #666;
    margin: 2px 0;
}

.compound-hint.active {
    color: #FF8C00;
    font-weight: bold;
}

/* Play Area (3x3 Grid) */
.play-area {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 10px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.play-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.play-title {
    font-weight: bold;
    color: #667eea;
    font-size: 0.9em;
}

.score-display {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

/* Grid Container with Enemy Lanes */
.grid-container {
    display: grid;
    grid-template-areas:
        ". top ."
        "left grid right"
        ". bottom .";
    grid-template-columns: 50px 1fr 50px;
    grid-template-rows: 50px 1fr 50px;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
    position: relative; /* For attack line positioning */
}

.play-grid {
    grid-area: grid;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
    aspect-ratio: 1;
    position: relative;
}

/* Enemy Lanes */
.enemy-lane {
    display: flex;
    gap: 4px;
}

.enemy-lane.top,
.enemy-lane.bottom {
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.enemy-lane.top {
    grid-area: top;
}

.enemy-lane.bottom {
    grid-area: bottom;
}

.enemy-lane.left {
    grid-area: left;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.enemy-lane.right {
    grid-area: right;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Enemy Cards */
.enemy-card {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border: 2px solid #dc3545;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
    animation: enemy-pulse 2s ease infinite;
}

@keyframes enemy-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.6);
    }
}

.enemy-card .enemy-target-indicator {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #dc3545;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
}

.enemy-card .enemy-kanji {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    line-height: 1;
}

.enemy-card .enemy-hp-bar {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
    overflow: hidden;
}

.enemy-card .enemy-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    transition: width 0.3s ease;
}

.enemy-card .enemy-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.4em;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

.enemy-card .enemy-intent {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ffc107;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.enemy-card .attack-warning {
    position: absolute;
    font-size: 1.5em;
    animation: warning-flash 0.5s ease infinite;
}

@keyframes warning-flash {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.enemy-slot-empty {
    width: 50px;
    height: 50px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    opacity: 0.3;
}

/* Attack Telegraph Lines */
.attack-line {
    position: absolute;
    pointer-events: none;
    z-index: 5;
}

@keyframes attack-pulse {
    0%, 100% {
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(220, 53, 69, 0.4));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(220, 53, 69, 0.8));
    }
}

.grid-slot {
    background: white;
    border: 1.5px dashed #adb5bd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.1s ease;
}

.grid-position-indicator {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.7em;
    color: #adb5bd;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
    font-weight: bold;
}

.grid-slot.valid-drop {
    background: #d4edda;
    border-color: #28a745;
    transform: scale(1.05);
}

.grid-slot.can-return {
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.grid-slot.enemy-target {
    background: rgba(255, 0, 0, 0.1);
    border: 1.5px solid #dc3545;
    box-shadow: 0 0 12px rgba(220, 53, 69, 0.5);
    animation: target-pulse 1s ease infinite;
}

@keyframes target-pulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(220, 53, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
}

/* Kanji Tiles */
.kanji-tile {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 1.5px solid #495057;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.kanji-tile.compound {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-color: #FF8C00;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.kanji-tile.dragging {
    opacity: 0.3;
}

.tile-strokes {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.5em;
    font-weight: bold;
    color: #6c757d;
    background: rgba(255,255,255,0.9);
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
}

.tile-info-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.6em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.tile-kanji {
    font-size: 1.4em;
    font-weight: bold;
    color: #212529;
    line-height: 1;
    pointer-events: none;
}

.tile-reading {
    position: absolute;
    bottom: 1px;
    font-size: 0.45em;
    color: #666;
    background: rgba(255,255,255,0.8);
    padding: 0 2px;
    border-radius: 2px;
    pointer-events: none;
}

/* Card Type Indicators */
.tile-type-icon {
    position: absolute;
    top: 2px;
    left: 28px;
    font-size: 0.6em;
    pointer-events: none;
    z-index: 1;
}

/* Equipment Badge */
.tile-equipment {
    position: absolute;
    bottom: 18px;
    right: 2px;
    font-size: 0.5em;
    font-weight: bold;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 1px 4px;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.5);
}

/* Type-specific tile backgrounds */
.kanji-tile.defender {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    border-color: #3b82f6;
}

.kanji-tile.spell {
    background: linear-gradient(135deg, #fae8ff 0%, #e9d5ff 100%);
    border-color: #a855f7;
}

.kanji-tile.structure {
    background: linear-gradient(135deg, #d1fae5 0%, #86efac 100%);
    border-color: #10b981;
}

.kanji-tile.equipment {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border-color: #f97316;
}

/* Hand Area */
.hand-area {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 10px;
    padding-bottom: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.hand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.hand-title {
    font-weight: bold;
    color: #495057;
    font-size: 0.9em;
}

.hand-count {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.8em;
}

.hand-cards-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hand-cards {
    display: flex;
    gap: 6px;
    padding-bottom: 10px;
    padding-top: 10px;
    align-items: center;
    justify-content: center;
}

.hand-card {
    min-width: 60px;
    width: 60px;
    height: 80px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1.5px solid #495057;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transform: translateY(0);
}

.hand-card.selected {
    transform: translateY(-10px) !important;
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffe7e7 0%, #ffcccc 100%);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.3);
}

.hand-card.discarding {
    animation: discardCard 0.4s ease-out forwards;
}

@keyframes discardCard {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) rotate(10deg) scale(0.9);
    }
    100% {
        transform: translateY(100px) rotate(20deg) scale(0.3);
        opacity: 0;
    }
}

.hand-card.played {
    opacity: 0;
    pointer-events: none;
}

.hand-card.dragging {
    opacity: 0.3;
}

.card-cost {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.6em;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 2px 5px;
    border-radius: 10px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-type-icon {
    position: absolute;
    top: 2px;
    left: 28px;
    font-size: 0.7em;
    z-index: 2;
}

.hand-card.too-expensive {
    opacity: 0.5;
    filter: grayscale(50%);
    cursor: not-allowed;
}

.hand-card.too-expensive .card-cost {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: rgba(255, 0, 0, 0.5);
}

.card-strokes {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.5em;
    font-weight: bold;
    color: #6c757d;
    background: rgba(255,255,255,0.9);
    padding: 1px 3px;
    border-radius: 2px;
}

.card-info-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.6em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hand-card .card-kanji {
    font-size: 1.6em;
    font-weight: bold;
    color: #212529;
    margin: 3px 0;
}

.hand-card .card-reading {
    position: absolute;
    bottom: 18px;
    font-size: 0.45em;
    color: #666;
    background: rgba(255,255,255,0.9);
    padding: 1px 3px;
    border-radius: 2px;
}

/* HP Bars for Cards */
.card-hp-bar {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 12px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.card-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.card-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5em;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* HP Bars for Tiles */
.tile-hp-bar {
    position: absolute;
    bottom: 2px;
    left: 2px;
    right: 2px;
    height: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

.tile-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.tile-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.45em;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Compound Indicators */
.compound-line {
    position: absolute;
    height: 3px;
    pointer-events: none;
    z-index: 5;
    background: linear-gradient(90deg, #FF69B4, #FF1493);
    animation: pulse 1s ease infinite;
    box-shadow: 0 0 6px rgba(255, 20, 147, 0.6);
}

.compound-line::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid #FF1493;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.compound-label {
    position: absolute;
    background: linear-gradient(135deg, #FF69B4, #FF1493);
    color: #fff;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 0.5em;
    font-weight: bold;
    pointer-events: none;
    z-index: 11;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transform: translate(-50%, -50%);
    border: 1px solid white;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.btn.play-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.btn.discard-btn {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
}

.btn.clear-btn {
    background: linear-gradient(135deg, #6c757d, #868e96);
}

/* Score Breakdown */
.score-breakdown {
    background: white;
    border-radius: 6px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.75em;
    display: none;
}

.score-breakdown.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.score-line {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid #e9ecef;
}

.score-line:last-child {
    border-bottom: none;
    font-weight: bold;
    color: #28a745;
    padding-top: 4px;
}

/* Result Banner */
.result-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px 40px;
    border-radius: 15px;
    font-size: 1.8em;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 2000;
}

.result-banner.victory {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    animation: victory-appear 2s ease forwards;
}

.result-banner.defeat {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
    color: white;
    animation: defeat-appear 2s ease forwards;
}

@keyframes victory-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(10deg);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

@keyframes defeat-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Drag Ghost */
.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 500;
    opacity: 0.8;
    width: 60px;
    height: 80px;
}

/* Full Info Modal */
.info-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.info-overlay.show {
    display: block;
}

.full-info-modal {
    display: none;
    position: fixed;
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 15px;
    width: 90%;
    max-width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.full-info-modal.show {
    display: block;
}

.modal-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.modal-kanji {
    font-size: 2.5em;
    font-weight: bold;
    color: #764ba2;
}

.modal-readings-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.9em;
    padding: 0 8px;
}

.modal-readings-header div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-close {
    background: #dc3545;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.info-box {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-box-label {
    font-size: 0.7em;
    color: #6c757d;
    margin-bottom: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-box-value {
    font-weight: bold;
    color: #333;
}

.info-box-value.radical {
    font-size: 1.8em;
    color: #667eea;
}

.info-box-value.strokes {
    font-size: 1.6em;
    color: #28a745;
}

.info-box-value.meaning {
    font-size: 0.9em;
    color: #495057;
    line-height: 1.3;
    min-height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-section {
    margin-bottom: 10px;
}

.modal-label {
    font-weight: bold;
    color: #667eea;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.modal-value {
    color: #333;
    font-size: 0.9em;
    margin-left: 8px;
}

.modal-compounds {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85em;
}

.modal-compound-item {
    padding: 4px 0;
    border-bottom: 1px solid #e9ecef;
}

.modal-compound-item:last-child {
    border-bottom: none;
}

.modal-compound-item.active {
    background: rgba(255, 215, 0, 0.2);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
}

.modal-compound-chars {
    font-weight: bold;
    color: #333;
}

.modal-compound-item.active .modal-compound-chars {
    color: #FF8C00;
}

.reading-type {
    display: inline-block;
    font-size: 0.7em;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: bold;
}

.reading-type.on {
    background: #e3f2fd;
    color: #1976d2;
}

.reading-type.kun {
    background: #fce4ec;
    color: #c2185b;
}

.reading-kanji {
    font-weight: bold;
    color: #333;
}

.reading-okurigana {
    font-weight: normal;
    color: #666;
}

/* Responsive */
@media (min-width: 768px) {
    .main-game-area {
        justify-content: center;
    }

    .info-panel {
        display: block !important;
    }
}

@media (max-width: 400px) {
    .controls {
        grid-template-columns: repeat(3, 1fr);
    }

    .btn {
        font-size: 0.8em;
        padding: 8px;
    }
}
