/* Pips - Board Styles */
/* Updated for better drop feedback */

.board-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.game-board {
    display: grid;
    gap: 2px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 6 / 5;
    width: min(100%, calc(100vh - 280px) * 1.2);
}

.cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(128, 128, 128, 0.3);
    transition: box-shadow 0.15s ease;
}

/* ========== DROP TARGET STATES ========== */

/* Valid drop target */
.cell.drop-target {
    box-shadow: inset 0 0 0 3px var(--accent);
    background: rgba(233, 69, 96, 0.1);
}

/* Invalid drop target */
.cell.drop-invalid {
    box-shadow: inset 0 0 0 3px var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* ========== VIOLATION STATE ========== */
/* Only shown when board is complete but wrong */

.cell.violated {
    animation: pulse-error 0.6s ease infinite alternate;
}

@keyframes pulse-error {
    from {
        box-shadow: inset 0 0 0 0 rgba(239, 68, 68, 0);
    }
    to {
        box-shadow: inset 0 0 0 3px rgba(239, 68, 68, 0.8);
    }
}

/* ========== CONSTRAINT LABELS ========== */

.constraint-label {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.8);
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 4px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 5;
    line-height: 1.2;
}

/* ========== DOMINO TRAY ========== */

.tray-container {
    background: var(--bg-secondary);
    padding: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.domino-tray {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    min-height: 56px;
}

.domino-tray::-webkit-scrollbar {
    height: 4px;
}

.domino-tray::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 2px;
}

.domino-tray::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

/* ========== ADMIRE MODE ========== */

.admire-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 24px;
}

.admire-content .game-board {
    pointer-events: none;
}

/* ========== GAME CONTENT LAYOUT ========== */

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-header {
    display: grid;
    grid-template-columns: 48px 1fr 60px;
    align-items: center;
}

.game-header .logo {
    text-align: center;
}

.game-header .timer {
    text-align: right;
}

/* ========== THUMBNAIL BOARD ========== */

.thumbnail-board {
    display: grid;
    gap: 1px;
    background: var(--bg-secondary);
    padding: 2px;
    border-radius: 4px;
    width: 100%;
    aspect-ratio: 6 / 5;
}

.thumbnail-cell {
    border-radius: 1px;
}

.thumbnail-cell.has-pip {
    background: white !important;
}

.thumbnail-pip {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    color: #333;
}
