.chess-game-view {
    background: #f8f9fa;
}

/* Header Section */
.game-hero {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 20px;
    text-align: center;
}

.hero-background {
    display: none;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
}

.game-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.game-title {
    font-size: 2.25rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.game-status-badge {
    display: flex;
    align-items: center;
    background: #7c2929;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-icon::before {
    content: '●';
    color: #28a745;
}

.tournament-card {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.tournament-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

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

.tournament-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #212529;
    font-weight: 600;
}

.tournament-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.tournament-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Main Content */
.game-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.bottom-row {
    width: 100%;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.375rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

/* Chess Board Section */
.board-section {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.board-container {
    text-align: center;
}

.board-wrapper {
    display: inline-block;
    margin: 0 auto;
}

.board-coordinates {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.rank-coordinates {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 484px;
    padding-top: 2px;
}

.rank-label {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    width: 20px;
}

.board-and-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    border: 2px solid #495057;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    width: 484px;
    height: 484px;
}

.file-coordinates {
    display: flex;
    justify-content: space-between;
    width: 484px;
    padding-left: 2px;
    padding-right: 2px;
}

.file-label {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    height: 20px;
}

.chess-square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.chess-square.light {
    background-color: #ebecd1;
}

.chess-square.dark {
    background-color: #739552;
}

.chess-square:hover {
    box-shadow: inset 0 0 0 2px #007bff;
}

.chess-square.selected {
    box-shadow: inset 0 0 0 3px #28a745;
    background-color: rgba(40, 167, 69, 0.3) !important;
}

.chess-square.possible-move {
    position: relative;
    animation: pulse-move 1.5s infinite;
}

.chess-square.possible-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #28a745;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
}

.chess-square.possible-capture {
    position: relative;
    animation: pulse-capture 1.5s infinite;
}

.chess-square.possible-capture::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 3px solid #dc3545;
    border-radius: 4px;
    opacity: 0.8;
}

@keyframes pulse-move {

    0%,
    100% {
        box-shadow: inset 0 0 0 2px rgba(40, 167, 69, 0.5);
    }

    50% {
        box-shadow: inset 0 0 0 2px rgba(40, 167, 69, 1);
    }
}

@keyframes pulse-capture {

    0%,
    100% {
        box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 0.5);
    }

    50% {
        box-shadow: inset 0 0 0 2px rgba(220, 53, 69, 1);
    }
}

.chess-piece {
    font-size: 4rem;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
    cursor: pointer;
    user-select: none;
}

.chess-piece:hover {
    transform: scale(1.05);
}

.chess-piece.selected {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.last-move-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.last-move-label {
    color: #6c757d;
}

.last-move-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
}

/* Players Section */
.players-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.player-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #007bff;
    border-radius: 8px 8px 0 0;
}

.player-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.player-color-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.color-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #495057;
}

.color-circle.white {
    background: #ffffff;
}

.color-circle.black {
    background: #495057;
}

.player-avatar {
    text-align: center;
    margin-bottom: 15px;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.player-title-badge {
    display: inline-block;
    background: #7c2929;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.federation-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.federation-info i {
    color: #007bff;
}

.player-info{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.player-name {
    margin-bottom: 0;
}

.player-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    text-decoration: none;
    transition: color 0.2s ease;
}

.player-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.player-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

.stat-item.clock {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.country-flag {
    width: 18px;
    height: auto;
    border-radius: 2px;
}

.no-player-data {
    text-align: center;
    color: #6c757d;
    padding: 30px 15px;
    font-style: italic;
}

/* Game Information Section */
.game-info-section {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

.info-label {
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.fen-card {
    grid-column: 1 / -1;
}

.fen-value {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fen-value code {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.85rem;
    flex: 1;
    min-width: 200px;
    word-break: break-all;
    border: 1px solid #dee2e6;
}

.copy-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .game-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: 1.875rem;
    }

    .game-title-section {
        flex-direction: column;
        gap: 15px;
    }

    .game-hero {
        padding: 30px 15px;
    }

    .game-content {
        padding: 20px 15px;
    }

    .players-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .chess-board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
        width: 320px;
        height: 320px;
    }
    
    .rank-coordinates{
        height: 320px;
    }

    .file-coordinates{
        width: 320px;
    }

    .chess-piece {
        font-size: 1.75rem;
    }

    .fen-value {
        flex-direction: column;
        align-items: stretch;
    }

    .board-section,
    .game-info-section {
        padding: 20px;
    }

    .top-row {
        display: flex;
        flex-direction: column;
    }


}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5rem;
    }

    .game-hero {
        padding: 25px 10px;
    }

    .game-content {
        padding: 15px 10px;
    }

    .chess-board {
        grid-template-columns: repeat(8, 32px);
        grid-template-rows: repeat(8, 32px);
    }

    .chess-piece {
        font-size: 1.4rem;
    }

    .board-section,
    .game-info-section {
        padding: 15px;
    }

    .player-card {
        padding: 15px;
    }

    .avatar-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}