.game-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 3px;
    background-color: #ddd;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: fit-content;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.board-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    min-width: 34px;
    min-height: 34px;
    border-radius: 3px;
}

.board-cell.normal {
    background-color: #f0f0f0;
}

.board-cell.DW {
    background-color: #ffcccb;
}

.board-cell.TW {
    background-color: #ff6b6b;
}

.board-cell.DL {
    background-color: #add8e6;
}

.board-cell.TL {
    background-color: #5da9e9;
    color: white;
}

.board-cell.center {
    background-color: #ffcccb;
}

.board-cell.drop-target {
    background-color: #ffd700;
}

.board-cell .special-label {
    font-size: 0.6rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    color: #666;
    position: absolute;
    text-align: center;
}

.tile {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #f9e5a9, #e6d193);
    border: 2px solid #b8935e;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    cursor: grab;
    position: relative;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.tile:active {
    cursor: grabbing;
}

.tile.dragging {
    opacity: 0.5;
}

.tile.placed {
    cursor: default;
    background: linear-gradient(145deg, #d4af37, #c19a2a);
}

.tile.recently-played {
    color: white;
}

.tile.recently-played .tile-value {
    color: white;
}

.tile .tile-letter {
    font-size: 1.2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
}

.tile .tile-value {
    position: absolute;
    bottom: -2px;
    right: 0px;
    font-size: 0.55rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    color: #555;
}

.tile .score-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #5da9e9;
    color: white;
    font-size: 0.6rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    padding: 0px 3px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
}

.tile .score-badge-preview {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    font-size: 0.6rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    padding: 0px 3px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10;
}

.rack-tiles .tile {
    width: 45px;
    height: 45px;
}

.tile.blank {
    background: linear-gradient(145deg, #fff9e6, #ffe6cc);
}

.tile.wildcard {
    background: linear-gradient(145deg, #e8f4f8, #d1e7f0);
    border-color: #5da9e9;
}

.tile.touch-dragging {
    width: 45px;
    height: 45px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
}

/* Responsive board */
@media (max-width: 768px) {
    .board-cell {
        min-width: 27px;
        min-height: 27px;
    }

    .board-cell .special-label {
        font-size: 0.45rem;
    }

    .board-cell .tile .tile-letter {
        font-size: 0.85rem;
    }

    .board-cell .tile .tile-value {
        font-size: 0.45rem;
    }

    .tile .score-badge {
        font-size: 0.5rem;
        padding: 0px 2px;
        bottom: -8px;
    }

    .tile .score-badge-preview {
        font-size: 0.5rem;
        padding: 0px 2px;
        bottom: -8px;
    }

    .rack-tiles .tile {
        width: 37px;
        height: 37px;
    }
}

@media (max-width: 480px) {
    .board-cell {
        min-width: 21px;
        min-height: 21px;
    }

    .board-cell .special-label {
        font-size: 0.4rem;
    }

    .board-cell .tile .tile-letter {
        font-size: 0.65rem;
    }

    .board-cell .tile .tile-value {
        font-size: 0.4rem;
    }

    .tile .score-badge {
        font-size: 0.45rem;
        padding: 0px 2px;
        bottom: -7px;
    }

    .tile .score-badge-preview {
        font-size: 0.45rem;
        padding: 0px 2px;
        bottom: -7px;
    }

    .rack-tiles .tile {
        width: 31px;
        height: 31px;
    }
}
