/* Основные стили для AI Fitness Trainer */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--tg-theme-bg-color, #f8fafc);
    color: var(--tg-theme-text-color, #1e293b);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
}

/* Приветственное окно */
.welcome-screen {
    padding: 40px 20px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.welcome-header {
    margin-bottom: 40px;
}

.logo {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.welcome-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

.features-list {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.feature-text {
    font-size: 16px;
    font-weight: 600;
    text-align: left;
}

.start-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Анкета */
.questionnaire-screen {
    padding: 20px;
    background: var(--tg-theme-bg-color, #f8fafc);
    min-height: 100vh;
}

.questionnaire-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px 0;
}

.questionnaire-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #1e293b);
}

.questionnaire-header p {
    font-size: 16px;
    color: var(--tg-theme-hint-color, #64748b);
}

.questionnaire-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--tg-theme-text-color, #1e293b);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #1e293b);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    background: white;
    color: var(--tg-theme-text-color, #1e293b);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.checkbox-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.checkbox-item span {
    font-weight: 500;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Главное меню */
.main-menu {
    padding: 20px;
    background: var(--tg-theme-bg-color, #f8fafc);
    min-height: 100vh;
}

.menu-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px 0;
}

.menu-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--tg-theme-text-color, #1e293b);
}

.menu-header p {
    font-size: 16px;
    color: var(--tg-theme-hint-color, #64748b);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-item {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.menu-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
}

.menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #1e293b);
}

.menu-description {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #64748b);
    line-height: 1.5;
}

/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    z-index: 1001;
    max-width: 90%;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.notification.error {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Темная тема */
.dark-theme {
    background: #0f172a;
    color: #f1f5f9;
}

.dark-theme .form-section,
.dark-theme .menu-item {
    background: #1e293b;
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .form-group input,
.dark-theme .form-group select,
.dark-theme .form-group textarea {
    background: #1e293b;
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Адаптивность */
@media (max-width: 768px) {
    .welcome-header h1 {
        font-size: 28px;
    }
    
    .logo {
        font-size: 60px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .feature-item {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .welcome-screen {
        padding: 30px 16px;
    }
    
    .welcome-header h1 {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .feature-text {
        font-size: 14px;
    }
    
    .start-btn {
        padding: 16px 32px;
        font-size: 16px;
    }
    
    .questionnaire-screen {
        padding: 16px;
    }
    
    .main-menu {
        padding: 16px;
    }
}

/* Анимации появления */
.form-section,
.menu-item {
    animation: fadeInUp 0.6s ease forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-item:nth-child(3) { animation-delay: 0.3s; }
.menu-item:nth-child(4) { animation-delay: 0.4s; }
.menu-item:nth-child(5) { animation-delay: 0.5s; }
.menu-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
