:root {
    --player-red: #ff4444;
    --player-yellow: #ffd700;
    --player1-color: #ff4444;
    --player2-color: #ffd700;
    --board-blue: #2196F3;
    --cell-size: 60px;
    --fall-speed: 0.5s;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    min-height: 100vh;
}

.game-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    margin: 2rem;
    position: relative;
}

/* Admin link */
.admin-link {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    text-decoration: none;
    opacity: 0.6;
    transition: all 0.3s;
}

.admin-link:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Game header */
.game-header {
    text-align: center;
    margin-bottom: 1rem;
}

.logo-text {
    font-size: 1em;
    color: #666;
    margin: 0.5rem 0;
    font-style: italic;
}

.logo-image {
    max-width: 200px;
    max-height: 80px;
    margin: 0.5rem auto;
    display: block;
}

.board {
    display: grid;
    grid-template-columns: repeat(7, var(--cell-size));
    grid-template-rows: repeat(6, var(--cell-size));
    gap: 5px;
    background-color: var(--board-blue);
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

.cell {
    background-color: white;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.cell::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cell:hover::after {
    opacity: 0.2;
    background-color: var(--board-blue);
}

.cell.red {
    background-color: var(--player1-color, var(--player-red));
}

.cell.yellow {
    background-color: var(--player2-color, var(--player-yellow));
}

.cell.red.with-image,
.cell.yellow.with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent !important; /* Override color when image is present */
}

.cell.winning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.status {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    background-color: var(--board-blue);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #1976D2;
}

.mode-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.mode-btn {
    background-color: #e0e0e0;
    border: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.mode-btn.active {
    background-color: var(--board-blue);
    color: white;
}

.difficulty-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.difficulty-selector.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.hidden {
    display: none;
}

.piece-drop {
    animation: drop var(--fall-speed, 0.5s) ease forwards;
}

@keyframes drop {
    from { transform: translateY(-500px); }
    to { transform: translateY(0); }
}

