.game-container {
    max-width: 800px;
    margin: 80px auto 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.game-icon-small {
    width: 40px;
    height: 40px;
}

.back-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: #495057;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #e9ecef;
    transform: translateX(-2px);
}

.game-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    background: #f1f3f5;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2b8a3e;
}

.game-screen {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Chess Board Styles */
.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    border: 5px solid #34495e;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cell {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    font-size: 2rem;
    transition: background-color 0.2s;
}

.cell.light {
    background-color: #ecf0f1;
}

.cell.dark {
    background-color: #95a5a6;
}

.cell.conflict {
    background-color: #ff7675 !important;
}

.cell:hover {
    filter: brightness(0.9);
}

.queen {
    width: 80%;
    height: 80%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path d="M224 512c35.3 0 64-28.7 64-64H160c0 35.3 28.7 64 64 64zM208 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm138.3 128.3L159.2 216c-17.5 8.9-17.5 34.3 0 43.1L346.3 371c13.7 7 13.7 26.6 0 33.6L124.6 512.2C106 521.8 83.2 511.4 79.4 490.4L37 256.3c-2.4-13.4 12.1-22.1 22.8-14l119.8 90.1 140-70-140-70-119.8 90.1c-10.7 8.1-25.2-0.6-22.8-14l42.4-233.1c3.8-21 26.6-31.4 45.2-21.8l221.7 114.2c13.7 7.1 13.7 26.6 0 33.7z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: placeQueen 0.3s ease-out;
}

/* Let's use a clearer Queen icon if possible, or just a better filter */
.cell.queen-cell::after {
    content: '👑';
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

@keyframes placeQueen {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.game-controls {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

#hintBtn {
    background: #3498db;
    color: white;
}

#hintBtn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

#resetBoardBtn {
    background: #e74c3c;
    color: white;
}

#resetBoardBtn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.hint-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px 15px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.hidden {
    display: none !important;
}

/* Overlay screens */
.start-screen,
.game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 15px;
    padding: 20px;
    box-sizing: border-box;
}

.start-content,
.game-over-content {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.setup-group {
    margin: 20px 0;
    text-align: left;
}

.setup-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.setup-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

.how-to-play {
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.how-to-play h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.how-to-play ul {
    margin: 0;
    padding-left: 20px;
}

.how-to-play li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #495057;
}

.game-start-btn,
.restart-btn {
    width: 100%;
    padding: 15px;
    background: #2b8a3e;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.game-start-btn:hover,
.restart-btn:hover {
    background: #237032;
    transform: scale(1.02);
}

.record-box {
    background: #e7f5ff;
    border: 1px solid #a5d8ff;
    padding: 15px;
    border-radius: 12px;
    margin: 20px 0;
}

.bottom-ad {
    margin-top: auto;
    padding-top: 20px;
    min-height: 100px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .game-container {
        margin: 60px 10px 10px;
        padding: 15px;
        min-height: calc(100vh - 80px);
    }

    .header h1 {
        font-size: 1.4rem;
    }

    .chess-board {
        max-width: 95vw;
    }

    .cell.queen-cell::after {
        font-size: 8vw;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 1rem;
    }
}