body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.main-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.athena-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.athena-face {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.athena-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.athena-face.thinking {
    animation: float 3s ease-in-out infinite, think 0.5s ease-in-out infinite;
}

.athena-face.happy {
    animation: float 3s ease-in-out infinite, bounce 0.5s ease-in-out;
}

.athena-face.worried {
    animation: float 3s ease-in-out infinite, shake 0.5s ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes think {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-20px);
    }

    75% {
        transform: translateY(5px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.athena-name {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.message-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    min-height: 100px;
    max-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.3);
    position: relative;
    color: #333;
}

.message-box::before {
    content: "💭";
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 24px;
}

.thinking-indicator {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    font-size: 12px;
    color: #667eea;
}

.thinking-indicator.show {
    display: block;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
}

.board-container {
    position: relative;
    display: inline-block;
}

.board {
    display: grid;
    grid-template-columns: repeat(9, 60px);
    grid-template-rows: repeat(9, 60px);
    gap: 1px;
    background: #f5e6d3;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #d4a574;
}

.cell {
    width: 60px;
    height: 60px;
    background: #fef9f0;
    border: 1px solid #d4a574;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.cell:hover {
    background: #fff8e7;
    transform: scale(1.05);
}

.cell.selected {
    background: #90EE90;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
}

.cell.possible-move {
    background: #FFE4B5;
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.cell.possible-drop {
    background: #E6E6FA;
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.6);
}

.cell.possible-move::after,
.cell.possible-drop::after {
    content: '•';
    position: absolute;
    color: #FF6347;
    font-size: 20px;
    animation: pulse 1s infinite;
}

.cell.last-move {
    background: rgba(255, 215, 0, 0.3);
}

.cell.in-check {
    background: #FFB6C1 !important;
    box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.5);
    animation: checkPulse 1s infinite;
}

@keyframes checkPulse {

    0%,
    100% {
        box-shadow: inset 0 0 20px rgba(255, 0, 0, 0.5);
    }

    50% {
        box-shadow: inset 0 0 30px rgba(255, 0, 0, 0.8);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.piece {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    font-weight: bold;
    border-radius: 5px;
    position: relative;
    transition: transform 0.2s ease;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

.piece:hover {
    transform: translateY(-2px);
}

.piece.player {
    background: linear-gradient(135deg, #f5e6d3, #ecdcc5);
    color: #333;
    border: 2px solid #8b7355;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.piece.ai {
    background: linear-gradient(135deg, #f5e6d3, #ecdcc5);
    color: #333;
    border: 2px solid #8b7355;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: rotate(180deg);
}

.piece.promoted {
    color: #c00;
}

.piece.promoted::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border: 2px solid #c00;
    border-radius: 5px;
    pointer-events: none;
}

.controls {
    margin-top: 20px;
    text-align: center;
}

button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(102, 126, 234, 0.6);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.status {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    color: #333;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.status.check-warning {
    background: linear-gradient(135deg, #FFE4B5, #FFD700);
    font-weight: bold;
    animation: statusPulse 1s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.captured-pieces {
    margin: 20px 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.captured-pieces h3 {
    margin: 5px 0;
    color: #333;
}

.captured-piece {
    display: inline-block;
    margin: 3px;
    padding: 8px;
    background: linear-gradient(135deg, #f5e6d3, #ecdcc5);
    color: #333;
    border: 2px solid #8b7355;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.captured-piece.ai-captured {
    background: linear-gradient(135deg, #f5e6d3, #ecdcc5);
    border: 2px solid #8b7355;
}

.captured-piece:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(139, 115, 85, 0.5);
}

.captured-piece.selected {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    border: 2px solid gold;
}

@keyframes moveAnimation {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.moving {
    animation: moveAnimation 0.5s ease;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content button {
    margin: 10px;
    min-width: 100px;
}

.game-over-modal {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.game-over-modal h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.eval-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.eval-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.eval-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    color: #333;
    font-weight: bold;
}

.ai-info {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    font-size: 14px;
}

.ai-info h4 {
    margin: 0 0 10px 0;
    color: #667eea;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
        align-items: center;
    }

    .athena-section {
        flex-direction: row;
        gap: 15px;
        margin-bottom: 20px;
    }

    .athena-face {
        width: 120px;
        height: 120px;
    }

    .athena-name {
        font-size: 20px;
    }

    .message-box {
        max-width: 200px;
        min-height: 80px;
        font-size: 14px;
        padding: 15px;
    }

    .board {
        grid-template-columns: repeat(9, 50px);
        grid-template-rows: repeat(9, 50px);
    }

    .cell {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .game-container {
        padding: 20px;
    }

    .athena-section {
        flex-direction: column;
        align-items: center;
    }

    .athena-face {
        width: 100px;
        height: 100px;
    }

    .athena-name {
        font-size: 18px;
    }

    .message-box {
        max-width: 100%;
        min-height: 60px;
        font-size: 13px;
        padding: 12px;
    }

    .board {
        grid-template-columns: repeat(9, 40px);
        grid-template-rows: repeat(9, 40px);
        padding: 8px;
    }

    .cell {
        width: 40px;
        height: 40px;
    }

    .piece {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    h1 {
        font-size: 1.5em;
    }

    button {
        padding: 10px 20px;
        font-size: 14px;
    }
}