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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.game-container {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

h1 {
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 0 0 20px #ff4500, 0 0 40px #ff1493, 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white;
}

.game-info {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid #ff1493;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
}

.player-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 15px;
}

.player {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #ff4500;
}

.player.active {
    background: rgba(255, 69, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 69, 0, 0.8);
    border-color: #ff4500;
}

.player-icon {
    font-size: 1.5em;
}

.turn-indicator {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffd700;
}

.game-status {
    font-size: 1.1em;
    color: #ff6b6b;
    font-weight: bold;
    min-height: 25px;
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.coordinates-left {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
}

.coordinates-left .coord {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.board-wrapper {
    display: flex;
    flex-direction: column;
}

.coordinates-bottom {
    display: flex;
    gap: 0;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.coordinates-bottom .coord {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1em;
}

.chessboard {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    border: 3px solid #8b4513;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    background: #fff;
}

.square {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    position: relative;
    color: #000;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.square.white-piece {
    color: #fff;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 3px #000;
}

.square.black-piece {
    color: #000;
    text-shadow:
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 2px rgba(255, 255, 255, 0.5);
}

.square.light {
    background-color: #f0d9b5;
}

.square.dark {
    background-color: #b58863;
}

.square.selected {
    background-color: #7fc97f !important;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.square.valid-move {
    background-color: #90ee90 !important;
}

.square.valid-move::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 128, 0, 0.5);
    border-radius: 50%;
}

.square.valid-capture::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 0, 0, 0.6);
    border-radius: 50%;
}

.square.in-check {
    background-color: #ff6b6b !important;
    animation: pulse 1s infinite;
}

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

.square:hover {
    filter: brightness(1.1);
}

.piece {
    pointer-events: none;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border: 2px solid #ff1493;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5), 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.8), 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: #ff4500;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.move-history {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    max-width: 600px;
    margin: 0 auto;
}

.move-history h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.move-list {
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.move-item {
    padding: 5px 10px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

.promotion-choices {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.promotion-piece {
    font-size: 3em;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.promotion-piece:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

