* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    padding-bottom: 20px;
}

/* Баннер встановлення PWA */
.install-banner {
    background: #2c3e50;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.install-info {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}
.install-info strong { font-size: 15px; }
#installBtn {
    background: #ff9f43;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

header {
    background-color: #4CAF50;
    color: white;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
header h1 { font-size: 24px; margin-bottom: 15px; }
nav { display: flex; justify-content: space-around; gap: 8px; }
nav button {
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
nav button:active { background: rgba(255,255,255,0.45); }
main { padding: 20px; max-width: 500px; margin: 0 auto; }

.view { display: none !important; }
.view.active { display: block !important; }

h2 { margin-bottom: 20px; text-align: center; color: #2c3e50; }

input, select {
    width: 100%; padding: 12px; margin-bottom: 15px;
    border: 1px solid #ddd; border-radius: 8px; font-size: 16px;
    background: white;
}
.primary-btn {
    width: 100%; padding: 14px; background-color: #4CAF50;
    color: white; border: none; border-radius: 8px;
    font-size: 16px; font-weight: bold; cursor: pointer;
}
.primary-btn:active { background-color: #45a049; }

/* Список карток */
.card-item {
    background: white; padding: 15px; border-radius: 8px;
    margin-bottom: 10px; display: flex; justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); align-items: center;
}
.delete-btn {
    background: #ff4757; color: white; border: none;
    border-radius: 5px; padding: 6px 12px; cursor: pointer;
}

/* Статистика */
.stats-box {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.stat-item {
    font-size: 16px;
    font-weight: bold;
}
.correct-stat { color: #2ed573; }
.wrong-stat { color: #ff4757; }
.percent-stat { color: #2c3e50; }

.controls { margin-bottom: 15px; }
.question { font-size: 32px; text-align: center; margin-bottom: 25px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.option-btn {
    padding: 18px 10px; background: white; border: 2px solid #ddd;
    border-radius: 8px; font-size: 16px; cursor: pointer; transition: 0.2s;
}
.option-btn.correct { background: #2ed573; color: white; border-color: #2ed573; }
.option-btn.wrong { background: #ff4757; color: white; border-color: #ff4757; }
.feedback { text-align: center; font-size: 18px; margin: 15px 0; font-weight: bold; }
.success-msg { color: #2ed573; text-align: center; margin-top: 10px; font-weight: bold; }
.error-msg { color: #d63031; text-align: center; background: #ffeaa7; padding: 12px; border-radius: 8px; }
.hidden { display: none !important; }