/* Font import */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap');

/* Umumiy sozlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', 'Comic Sans MS', cursive;
    text-align: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Har bir ekran (screen) */
.screen {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 28px;
    gap: 20px;
    padding: 20px;
    color: #53104d;
}

/* Yashirish classi */
.hidden { 
    display: none;
}

/* Tugmalar */
button {
    font-family: 'Fredoka', 'Comic Sans MS', cursive;
    font-size: 24px;
    padding: 14px 32px;
    cursor: pointer;
    border-radius: 16px;
    border: none;
    background-color: #ee3a3a;
    color: white;
    font-weight: 700;
    transition: all 0.2s;
    box-shadow: 0 4px 0 #b82828;
}

button:hover {
    background-color: #3a60f9;
    box-shadow: 0 4px 0 #2a48b8;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2a48b8;
}

/* Misol (task) */
#task {
    font-size: 64px;
    font-weight: 700;
    color: #F7EC09;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    margin: 10px 0;
}

/* Info panel (natijalar) */
.info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 90%;
    max-width: 400px;
    gap: 15px;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}

.info > div {
    background-color: #ED7B7B;
    color: #F7EC09;
    padding: 12px 20px;
    border-radius: 16px;
    min-width: 90px;
    box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}

.info > div:nth-child(2) {
    background-color: #F7EC09;
    color: #30A2FF;
}

.info > div:nth-child(3) {
    background-color: #ED7B7B;
    color: #F7EC09;
}

/* Board (o'yin taxtasi) */
#board {
    width: 90%;
    max-width: 420px;
    aspect-ratio: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 3px;
    background-color: #26bdf9;
    padding: 3px;
    border-radius: 20px;
    box-shadow: 0 8px 0 rgba(0,0,0,0.2);
}

/* Har bir katak (tile) */
.tile {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 42px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border-radius: 8px;
}

.tile:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    z-index: 10;
}

.tile:active {
    transform: scale(0.95);
}

/* Shashka ranglari */
.tile:nth-child(8n + 1),
.tile:nth-child(8n + 3),
.tile:nth-child(8n + 6),
.tile:nth-child(8n + 8) {
    background: #F7EC09;
    color: #30A2FF;
}

.tile:nth-child(8n + 2),
.tile:nth-child(8n + 4),
.tile:nth-child(8n + 5),
.tile:nth-child(8n + 7) {
    background: #30A2FF;
    color: #F7EC09;
}

/* Har bir ekran uchun fon ranglari */
#startBox { 
    background: linear-gradient(135deg, #e6e066 0%, #d4ce52 100%); 
}

#rulesBox { 
    background: linear-gradient(135deg, #ED7B7B 0%, #d96a6a 100%); 
}

#gameBox { 
    background: linear-gradient(135deg, #1cdeec 0%, #26bdf9 100%); 
}

#win { 
    background: linear-gradient(135deg, #4ade80 0%, #3bc770 100%); 
}

#lose { 
    background: linear-gradient(135deg, #fb7185 0%, #e85a6f 100%); 
}

/* Sarlavhalar */
h1 {
    font-size: 56px;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}

/* Paragraflar */
p {
    font-size: 22px;
    line-height: 1.8;
    max-width: 650px;
    font-weight: 500;
}