:root { 
    --primary-color: #ffffff; 
    --bg-gradient: linear-gradient(135deg, #172b4d, #1a365d, #204066);
    --glass-bg: rgba(255, 255, 255, 0.1); 
    --header-bg: rgba(10, 15, 30, 0.7);
    --hover-color: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.2); 
    --text-muted: rgba(255, 255, 255, 0.7);
}

/* Стиль для кнопки перемикання теми */
.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    color: var(--primary-color);
}

.theme-toggle:hover {
    background: var(--hover-color);
    transform: scale(1.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    /* ОСТАТИЧНИЙ ТА СТИЛЬНИЙ ФОН (без анімації та фігні) */
    background: var(--bg-gradient);    background-size: cover;
    background-attachment: fixed; /* Глибина без руху */
    color: var(--primary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    /* Зменшили верхній і нижній відступи з 20px до 12px, щоб звузити шапку */
    padding: 12px 50px; 
    
    /* Зробили фон трохи темнішим, щоб текст шапки краще читався при скролі поверх контенту */
    background: var(--header-bg);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    
    /* МАГІЯ ФІКСАЦІЇ */
    position: sticky; 
    top: 0; 
    z-index: 1000; /* Шапка завжди буде поверх усіх інших елементів */
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    line-height: 1;
}

.logo span { color: #00e5ff; }

/* Кастомний перемикач мов */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: var(--glass-bg);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px; /* Відступ між прапором і текстом */
}

.lang-btn:hover { background: var(--hover-color); }

.lang-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: rgba(20, 30, 60, 0.95);
    backdrop-filter: blur(15px);
    min-width: 160px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 101;
}

.lang-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
}

.lang-dropdown:hover .lang-content {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-content div {
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-content div:first-child { border-radius: 8px 8px 0 0; }
.lang-content div:last-child { border-radius: 0 0 8px 8px; }

.lang-content div:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #00e5ff;
}

/* СТИЛІ ДЛЯ ІКОНОК ПРАПОРІВ (графічні картинки) */
.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.translatable { transition: opacity 0.3s ease-in-out; }

main { flex: 1; padding: 50px; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 10; }
.hero { text-align: center; margin-bottom: 60px; max-width: 800px; }
.hero h1 { font-size: 48px; margin-bottom: 20px; font-weight: 700; }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 30px; line-height: 1.6; }

.tenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.time-group {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.time-group:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }
.time-group h2 { font-size: 24px; margin-bottom: 20px; border-bottom: 2px solid var(--glass-border); padding-bottom: 10px; text-align: center; }

.tense-item {
    display: block;
    text-decoration: none;
    color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.tense-item:hover { background: var(--hover-color); border-color: rgba(255, 255, 255, 0.4); transform: translateX(5px); }
.tense-item strong { display: block; font-size: 18px; margin-bottom: 5px; }
.tense-item span { font-size: 14px; opacity: 0.7; display: block; }

.benefits-section { margin-top: 80px; text-align: center; width: 100%; max-width: 1200px; }
.benefits-section h2 { font-size: 32px; margin-bottom: 40px; font-weight: 700; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.benefit-card { background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 30px 20px; transition: transform 0.3s ease; }
.benefit-card:hover { transform: translateY(-5px); }
.benefit-icon { font-size: 40px; margin-bottom: 15px; }
.benefit-card h3 { font-size: 20px; margin-bottom: 10px; color: #00e5ff; }
.benefit-card p { font-size: 14px; opacity: 0.8; line-height: 1.5; }

.author-section { margin-top: 60px; background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-radius: 20px; padding: 40px; max-width: 800px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.author-section h2 { font-size: 28px; margin-bottom: 20px; color: #00e5ff; }
.author-section p { font-size: 16px; line-height: 1.8; opacity: 0.9; }

/* footer { text-align: center; padding: 20px; margin-top: 40px; background: rgba(0, 0, 0, 0.2); font-size: 14px; opacity: 0.8; width: 100%; position: relative; z-index: 10; } */

/* --- FOOTER (ПІДВАЛ САЙТУ) --- */
footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.3); /* Трохи темніший фон */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Дуже м'яка лінія */
    text-align: center;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin-bottom: 20px; /* Відступ вниз до посилань */
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-links a:hover {
    color: #00e5ff;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

/* Адаптація під світлу тему */
[data-theme="light"] footer {
    background: rgba(0, 0, 0, 0.03); /* Легке затемнення для світлої теми */
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .footer-links a { color: rgba(0, 0, 0, 0.6); }
[data-theme="light"] .footer-links a:hover { color: #008b99; text-shadow: none; }
[data-theme="light"] .footer-copy { color: rgba(0, 0, 0, 0.5); }
