/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    color: #085908;
    background-image: url('https://i.pinimg.com/736x/22/e1/be/22e1be41b6a6c03f788140e06fdad16a.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transition: all 0.5s ease;
    line-height: 1.6;
}

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

/* Стили шапки */
.site-header {
    background-color: #79B465;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-logo img {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.header-text {
    text-align: center;
    flex-grow: 1;
    margin: 0 20px;
}

.header-text h1 {
    color: #085908;
    font-size: 1.8rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    margin: 0;
}

/* Переключатель тем */
.theme-switcher {
    position: relative;
}

.theme-button {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #2F4538;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #2F4538;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.theme-button:hover {
    background: #2F4538;
    color: white;
    transform: translateY(-2px);
}

.theme-options {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 10px;
    margin-top: 5px;
    min-width: 180px;
    z-index: 100;
}

.theme-option {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px 0;
    transition: all 0.2s ease;
    font-family: Arial, sans-serif;
}

.theme-option:hover {
    background: #f0f0f0;
}

/* Основное содержимое */
.main-content {
    padding: 30px 0;
}

.content-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.content-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.content-col {
    flex: 1;
}

h2 {
    color: #2F4538;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
}

h3 {
    color: #2F4538;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

a {
    color: #2F4538;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #79B465;
    text-decoration: underline;
}

/* Стили для GIF контейнера */
.gif-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gif-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.caption {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Стили таблицы */
.my-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.my-table th, .my-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

.my-table th {
    background-color: #79B465;
    color: white;
    font-weight: bold;
}

.my-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.my-table tr:hover {
    background-color: #f1f1f1;
}

/* Кнопки */
.btn {
    position: relative;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background-color: #45a049;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 10px;
}

.btn:hover:not(:disabled) {
    background-color: #3d8c40;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background-color: #367c39;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loading-spinner {
    display: none;
    align-items: center;
    gap: 8px;
}

/* Стили для красивого спиннера */
.loading-spinner::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Анимации */
.animation-section {
    background: rgba(255, 255, 255, 0.9);
}

.animation-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.animation-item {
    text-align: center;
    margin: 15px 0;
}

/* 1. Пульсирующий круг */
.pulse-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 50%;
    margin: 0 auto;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    }
}

/* 2. Вращающийся квадрат */
.rotating-square {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #4ecdc4, #00b894);
    margin: 0 auto;
    animation: rotate 6s infinite linear;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 3. Бегущая строка */
.marquee {
    width: 100%;
    overflow: hidden;
    background: #2d572d;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.marquee-text {
    white-space: nowrap;
    animation: marquee 14s linear infinite;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 4. Мигающие точки */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    animation: blink 1.5s infinite ease-in-out;
}

.dot:nth-child(1) {
    background: #fdcb6e;
    animation-delay: 0s;
}

.dot:nth-child(2) {
    background: #00cec9;
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    background: #6c5ce7;
    animation-delay: 0.4s;
}

.dot:nth-child(4) {
    background: #e84393;
    animation-delay: 0.6s;
}

@keyframes blink {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* 5. Двигающаяся линия */
.moving-line {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #2F4538, transparent);
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.moving-line::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(47, 69, 56, 0.8), transparent);
    animation: moveLine 2s infinite linear;
}

@keyframes moveLine {
    0% {
        left: -100px;
    }
    100% {
        left: 100%;
    }
}

/* 6. Подпрыгивающий шар */
.bouncing-ball {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #fd79a8, #e84393);
    border-radius: 50%;
    margin: 0 auto;
    animation: bounce 1.5s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* Темы оформления */
/* Темная тема */
.dark-theme {
    color: #e0e0e0;
    background-color: #121212;
    background-image: none;
}

.dark-theme .site-header {
    background-color: #1e1e1e;
}

.dark-theme .header-text h1 {
    color: #79B465;
}

.dark-theme .content-section,
.dark-theme .animation-section,
.dark-theme .gif-container {
    background: rgba(40, 40, 40, 0.9);
    color: #e0e0e0;
}

.dark-theme h2, .dark-theme h3 {
    color: #79B465;
}

.dark-theme a {
    color: #a0d8a0;
}

.dark-theme a:hover {
    color: #79B465;
}

.dark-theme .my-table th {
    background-color: #2d5a2d;
}

.dark-theme .my-table tr:nth-child(even) {
    background-color: #2a2a2a;
}

.dark-theme .my-table tr:hover {
    background-color: #3a3a3a;
}

.dark-theme .theme-button {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #79B465;
}

.dark-theme .theme-options {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-theme .theme-option:hover {
    background: #3d3d3d;
}

/* Светлая тема */
.light-theme {
    color: #333;
    background-color: #f9f9f9;
    background-image: none;
}

.light-theme .site-header {
    background-color: #e6f2e6;
}

.light-theme .header-text h1 {
    color: #2d5a2d;
}

.light-theme .content-section,
.light-theme .animation-section,
.light-theme .gif-container {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
}

.light-theme h2, .light-theme h3 {
    color: #2d5a2d;
}

.light-theme a {
    color: #4a8e4a;
}

.light-theme a:hover {
    color: #2d5a2d;
}

.light-theme .my-table th {
    background-color: #4a8e4a;
}

.light-theme .theme-button {
    background: #f0f7f0;
    color: #2d5a2d;
    border-color: #4a8e4a;
}

/* Нейтральная тема */
.neutral-theme {
    color: #555;
    background-color: #f5f5f5;
    background-image: none;
}

.neutral-theme .site-header {
    background-color: #e0e0e0;
}

.neutral-theme .header-text h1 {
    color: #666;
}

.neutral-theme .content-section,
.neutral-theme .animation-section,
.neutral-theme .gif-container {
    background: rgba(255, 255, 255, 0.9);
    color: #555;
}

.neutral-theme h2, .neutral-theme h3 {
    color: #666;
}

.neutral-theme a {
    color: #888;
}

.neutral-theme a:hover {
    color: #666;
}

.neutral-theme .my-table th {
    background-color: #a0a0a0;
}

.neutral-theme .theme-button {
    background: #f0f0f0;
    color: #666;
    border-color: #888;
}

/* Детская тема */
.kids-theme {
    color: #333;
    background-color: #fff0f5;
    background-image: none;
}

.kids-theme .site-header {
    background: linear-gradient(45deg, #ff9ec0, #9ecaff);
}

.kids-theme .header-text h1 {
    color: #ff6b9c;
}

.kids-theme .content-section,
.kids-theme .animation-section,
.kids-theme .gif-container {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.kids-theme h2, .kids-theme h3 {
    color: #ff6b9c;
}

.kids-theme a {
    color: #5d8aff;
}

.kids-theme a:hover {
    color: #ff6b9c;
}

.kids-theme .my-table th {
    background: linear-gradient(45deg, #ff9ec0, #9ecaff);
}

.kids-theme .theme-button {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b9c;
    border-color: #ff6b9c;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-logo {
        margin-bottom: 15px;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .content-row {
        flex-direction: column;
    }
    
    .animation-row {
        flex-direction: column;
    }
    
    .theme-switcher {
        margin-top: 15px;
    }
}
