/* ==========================================
   IRREGULAR VERBS - NEW DESIGN
   Mobile-first підхід
   ========================================== */

/* ==========================================
   ЗАГАЛЬНІ СТИЛІ
   ========================================== */

* {
    box-sizing: border-box;
}

/* 
body {
    margin: 0;
    padding: 0;
}

*/

body {
    margin: 0 auto;      /* ← ТУТ ЗМІНЕНО з "margin: 0;" */
    padding: 0;
    max-width: 100%;     /* ← ДОДАНО */
}

.main-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    background-color: white;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 18px;
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;  
    color: var(--secondary-color);
    flex: 1;
}

.burger-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--secondary-color);
    transition: all 0.3s;
}

.burger-btn:hover {
    color: var(--primary-color);
}

.burger-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   BURGER MENU OVERLAY
   ========================================== */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    animation: fadeIn 0.3s;
}

.menu-overlay.hidden {
    display: none;
}

.menu-container {
    background-color: white;
    width: 80%;
    max-width: 320px;
    height: 100%;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.close-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.close-menu-btn:hover {
    color: #333;
}

.menu-nav {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
}

.menu-item {
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    color: #333;
}

.menu-item:hover {
    background-color: #f5f5f5;
}

.menu-arrow {
    color: #999;
    font-size: 14px;
}

/* ==========================================
   СУБМЕНЮ
   ========================================== */

.submenu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s;
}

.submenu.hidden {
    display: none;
}

.submenu-back-btn {
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid #eee;
    color: var(--secondary-color);
}

.submenu-back-btn:hover {
    background-color: #f5f5f5;
}

.submenu-item {
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    color: #333; 
}

.submenu-item:hover {
    background-color: #f5f5f5;
}

.submenu-item.active {
    background-color: #e9f7fe;
    font-weight: bold;
    color: var(--secondary-color);
}

.radio-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
}

.submenu-item.active .radio-indicator {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color);
    position: relative;
}

.submenu-item.active .radio-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

/* ==========================================
   МОДАЛЬНІ ВІКНА
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    padding: 0;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #333;
}

.help-content ol,
.help-content ul {
    padding-left: 20px;
}

.help-content li {
    margin-bottom: 8px;
}

/* ==========================================
   ПРОГРЕС
   ========================================== */

.progress-section {
    margin-bottom: 20px;
}

.progress-text {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    margin: 0;
}

/* ==========================================
   КАРТКА ДІЄСЛОВА
   ========================================== */

.verb-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.verb-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.verb-title {
    font-size: 24px;
    color: var(--primary-color);
    margin: 0;
    flex: 1;
}

.verb-progress {
    text-align: right;
}

.progress-counter {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.verb-circles {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.progress-circle {
    width: 15px;
    height: 15px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: inline-block;
}

.progress-circle.correct {
    background-color: var(--correct-color);
    border-color: var(--correct-color);
}

/* ==========================================
   СПОЙЛЕР З ПРИКЛАДАМИ
   ========================================== */

.examples-spoiler {
    margin-top: 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #ddd;
}

.spoiler-header {
    background-color: #f5f5f5;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    border: none;
    width: 100%;
    text-align: left;
    transition: background-color 0.3s;
    color: #333;
}

.spoiler-header:hover {
    background-color: #e9e9e9;
}

.spoiler-icon {
    transition: transform 0.3s;
}

.examples-spoiler.open .spoiler-icon {
    transform: rotate(180deg);
}

.spoiler-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.examples-spoiler.open .spoiler-content {
    max-height: 1000px;
}

.example-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.example-item:last-child {
    border-bottom: none;
}

.example-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.example-header .tense-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

.example-header .tense-name {
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.example-text {
    line-height: 1.6;
    color: #333;
}





/* Стилі для прихованих дієслів  */
.hidden-verb {
    display: inline-block;
   background-color: var(--primary-color); 
 /*    background-color: black;*/
    padding: 2px 15px;
    border-radius: 4px;
    color: transparent;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 40px;
    height: line-height: 1.5;
    vertical-align: middle;
    position: relative;

}

.hidden-verb::after {
    content: "?";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;

}

.hidden-verb.revealed {
    background-color: transparent;
  /*   color: var(--primary-color); */
    color: black; 
    font-weight: bold;
    box-shadow: 0 0 0 2px var(--primary-color);
    vertical-align: middle;
}

.hidden-verb.revealed::after {
    content: none;
}

.hidden-verb.auxiliary {
    background-color: var(--accent-color);

}

.hidden-verb.auxiliary::after {
    content: "a";
    font-size: 10px;
}

.hidden-verb.participle::after {
    content: "v";
    font-size: 10px;
}

.hidden-verb.auxiliary.revealed {
    background-color: transparent;
   /* color: var(--accent-color); */
    color: royalblue; 
    box-shadow: 0 0 0 2px var(--accent-color);
  
}

.hidden-verb.participle.revealed {
    background-color: transparent;
   /*  color: var(--primary-color); */
    color: black; 
    box-shadow: 0 0 0 2px var(--primary-color);

}

.hidden-verb.auxiliary.revealed::after {
    content: none;  /* ← Прибирає "a" після reveal */
  
}

.hidden-verb.participle.revealed::after {
    content: none;  /* ← Прибирає "v" після reveal */

}



/* ==========================================
   ФОРМИ ВВЕДЕННЯ
   ========================================== */

.forms-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border 0.3s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.auxiliary-options {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.aux-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.aux-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.aux-option span {
    font-weight: normal;
    color: #333;
}

.aux-option.selected span {
    font-weight: bold;
    color: var(--secondary-color);
}

.feedback {
    margin-top: 8px;
    min-height: 22px;
    font-size: 14px;
}

.feedback.correct {
    color: var(--correct-color);
}

.feedback.incorrect {
    color: var(--incorrect-color);
}

/* ==========================================
   КНОПКИ
   ========================================== */

.action-section {
    text-align: center;
    margin-bottom: 20px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    min-width: 200px;
}

/* ==========================================
   ПОСИЛАННЯ
   ========================================== */

.link-section {
    text-align: center;
}

.text-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 14px;
}

.text-link:hover {
    text-decoration: underline;
}

/* ==========================================
   FOOTER
   ========================================== */

footer {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}


/* ==========================================
   RESPONSIVE (DESKTOP)
   ========================================== */
@media (min-width: 768px) {
    body {
        max-width: 660px;  /* ← контент + padding */
        margin: 0 auto;
    }

    .header h1 {
        font-size: 24px;
    }

    .main-container {
        padding: 30px;
    }

    .verb-title {
        font-size: 28px;
    }

    .menu-container {
        max-width: 400px;
    }
}

/* ==========================================
   UTILITY
   ========================================== */

.hidden {
    display: none !important;
}
