* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    padding: clamp(10px, 4vw, 30px);
    text-align: center;
    color: white;
    background-image: url("/images/bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
}

h1,
#suggestion,
.five-checkbox {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

/* Tytuł */
h1 {
    font-size: clamp(24px, 6vw, 32px);
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Sugestia */
#suggestion {
    font-size: clamp(16px, 4.5vw, 18px);
    margin-top: 10px;
}

/* Panel górny */
.top-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 3vw, 24px);
    margin-bottom: 20px;
}

#cardSelection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.card-btn {
    width: clamp(45px, 12vw, 70px);
    height: clamp(35px, 10vw, 42px);
    font-size: clamp(16px, 4vw, 20px);
    cursor: pointer;
    border: 2px solid #ccc;
    background: #eee;
    color: #333;
    border-radius: 4px;
}

.card-btn:hover {
    background: #ddd;
}

.five-checkbox {
    font-size: clamp(14px, 4vw, 16px);
    white-space: nowrap;
    cursor: pointer;
}

/* Plansza */
.board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

#board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: clamp(4px, 1.5vw, 8px);
    width: 100%;
    max-width: 500px;
}

.cell {
    width: 100%;
    aspect-ratio: 1.46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 5vw, 24px);
    cursor: pointer;
    border: 2px solid #ccc;
    background: #f5f5f5;
    color: #333;
    transition: 0.15s;
    border-radius: 4px;
}

.cell:hover {
    transform: scale(1.03);
}

/* Przycisk resetu */
.reset-btn {
    padding: clamp(10px, 3vw, 12px) clamp(15px, 5vw, 24px);
    font-size: clamp(16px, 4.5vw, 18px);
    cursor: pointer;
    border-radius: 6px;
    border: none;
    background: #e74c3c;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    transition: background 0.2s, transform 0.1s;
}

.reset-btn:hover {
    background: #c0392b;
}

.reset-btn:active {
    transform: scale(0.95);
}

/* Stany komórek */
.revealed {
    background: #d7ffd7;
}

.has-five {
    background-color: #ffb3b3;
}

.no-five {
    background-color: #b6fcb6;
}

.certain-five {
    background: #ff4d4d;
    color: white;
    font-weight: bold;
}

.near-five {
    outline: 3px solid orange;
}

.selected {
    border: 4px solid #007bff !important;
}