/* style.css */
body {
    background-color: #0f172a;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-wrapper {
    width: 90%;
    max-width: 480px;
    height: 98vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.main-title { text-align: center; margin: 0; font-size: 1.8rem; }

.stats-container {
    display: flex;
    justify-content: space-between;
    background: #1e293b;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: bold;
}

/* Деңгээлдин көк фону (Сүрөттөгүдөй) */
.level-badge {
    background: #1d4ed8;
    padding: 5px 15px;
    border-radius: 5px;
}

.info-bar {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
}

/* RGB Анимацияланган баскыч */
.rgb-button {
    padding: 8px 18px;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff, #ff0000);
    background-size: 400% 400%;
    animation: rgbShift 3s linear infinite;
}

@keyframes rgbShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: #161e2e;
    padding: 12px;
    border-radius: 12px;
}

.card {
    aspect-ratio: 1/1;
    background: #1e293b;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    transition: 0.2s;
}

.card.active {
    background: #38bdf8;
    box-shadow: 0 0 15px #38bdf8;
}

.card.hidden {
    background: white;
    color: transparent;
    cursor: pointer;
}

.card.correct { visibility: hidden; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal-content {
    background: #1e293b;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.restart-btn {
    margin-top: 15px;
    padding: 10px 25px;
    background: #38bdf8;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
/* style.css ичине кошумча же алмаштыруу */
.timer-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    margin-top: 5px;
    overflow: hidden;
}

#timer-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #ef4444);
    transition: width 1s linear;
}

.game-timer-text {
    font-weight: bold;
    color: #ff7675;
}
/* style.css ичиндеги modal-content бөлүгүнө кошумча */
.modal-content {
    background: #1e293b;
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    max-width: 400px;
    border: 3px solid #38bdf8;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.5);
}

.percent-display {
    font-size: 1.8rem; /* Пайыз тексти бир аз кичирээк */
    color: #00ff00;
    margin: 10px 0;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

#result-motivation {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #f8fafc;
    margin-top: 20px;
    font-style: italic;
}
/* Башкы беттин жалпы стили */
.welcome-card {
    background: #ffffff;
    width: 90%;
    max-width: 500px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    font-family: 'Segoe UI', sans-serif;
    color: #334155;
    margin: auto;
}

/* Сүрөт (ГИФ) жайгашкан бөлүк */
.header-image {
    width: 100%;
    height: 220px;
    background: #1e293b; /* ГИФ жок болсо убактылуу фон */
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-gif {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Сүрөт толук батышы үчүн */
}

/* Текст жайгашкан бөлүк */
.content {
    padding: 15px;
    text-align: center;
}

.title {
    color: #1e293b;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Эрежелердин тизмеси */
.rules-list {
    text-align: left;
    background: #f1f5f9;
    padding: 20px 20px 20px 30px;
    border-radius: 15px;

}

.rules-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #475569;
}

/* Баштоо баскычы */
.start-game-btn {
    width: 100%;
    padding: 15px;
    background: #38bdf8;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.start-game-btn:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
}
blockquote {
    border-left: 4px solid #38bdf8;
    margin: 15px 0;
    padding-left: 15px;
    color: #94a3b8;
    font-style: italic;
}
.history-modal {
    display: none; /* Башында жашыруун болушу керек */
    position: fixed;
    z-index: 9999; /* Баарынан үстүндө болушу үчүн */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Кара фон */
    backdrop-filter: blur(4px); /* Фонду тунарык кылуу */
    display: none; /* JS аркылуу 'flex' болот */
    align-items: center;
    justify-content: center;
}

/* Эгер JS 'flex' кылса, экрандын ортосуна келет */
#history-modal[style*="display: flex"] {
    display: flex !important;
}
/* "Толук маалымат" баскычынын дизайны */
.info-link-btn {
    /* background-color: transparent; */
    color: #38bdf8;
    /* font-size: 1rem; */
    font-weight: 600;
    padding: 5px 10px;
    border: 1px solid #38bdf8;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* text-transform: uppercase; */
    letter-spacing: 1px;
    /* margin-bottom: 20px; */
    outline: none;
    display: inline-block;
}

/* Баскычтын үстүнө чычканда (hover) боло турган эффект */
.info-link-btn:hover {
    background-color: #38bdf8; /* Фон көгүш түскө боёлот */
    color: #ffffff; /* Текст ак түскө өзгөрөт */
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6); /* Жумшак жаркыроо эффекти */
    transform: scale(1.05); /* Бир аз чоңоюу эффекти */
}

/* Баскычты баскан учурда (active) */
.info-link-btn:active {
    transform: scale(0.95); /* Бир аз кичирейүү */
}
.history-content {
    background-color: #1e293b;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
}

.close-history {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #94a3b8;
}
blockquote {
    border-left: 4px solid #38bdf8;
    margin: 15px 0;
    padding-left: 15px;
    color: #94a3b8;
    font-style: italic;
}