* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
}

:root {
    --primary-blue: #2c3e50;
    --light-blue: #3498db;
    --slate-blue: #4a6572;
    --light-gray: #f5f7fa;
    --accent-coral: #e76f51;
    --accent-green: #2a9d8f;
    --dark-gray: #34495e;
}

header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--slate-blue);
    font-weight: bold;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-coral);
}

.cta-button {
    background-color: var(--accent-coral);
    color: white !important;
    border-radius: 25px;
    padding: 0.5rem 1.5rem !important;
}

.cta-button:hover {
    background-color: #d65c40;
    transform: translateY(-2px);
}

main {
    margin-top: 80px;
    padding: 2rem 5%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--slate-blue);
    margin-bottom: 2rem;
}

.hero-button {
    display: inline-block;
    background-color: var(--accent-coral);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.hero-button:hover {
    background-color: #d65c40;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(231, 111, 81, 0.3);
}

.hero-visual {
    background: linear-gradient(135deg, var(--light-blue), var(--accent-green));
    border-radius: 10px;
    padding: 2rem;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.visual-placeholder {
    text-align: center;
}

.visual-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.steps-section {
    background-color: var(--light-gray);
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 3rem;
}

.steps-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
    margin-bottom: 3rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.step:hover {
    transform: translateY(-10px);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--accent-green);
    margin-bottom: 1rem;
}

.step h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-weight: bold;
}

.step-visual {
    margin-top: 1.5rem;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-kit-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.create-kit-form h3 {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--slate-blue);
    font-weight: bold;
}

.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent-coral);
}

.submit-btn {
    width: 100%;
    background-color: var(--accent-coral);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #d65c40;
}

.result-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 3rem 5% 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-disclaimer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer strong {
    color: white;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ================== ДОБАВЛЕНИЯ ДЛЯ ФОРМЫ ЗАГРУЗКИ ФОТО ================== */

/* Контейнер для анализа изображений */
#imageAnalysisSection {
    display: none;
}

/* Заголовок анализа */
.analysis-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.analysis-header h4 {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.analysis-header p {
    color: var(--slate-blue);
}

/* Область загрузки файлов */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    margin: 1.5rem 0;
    background: rgba(245, 247, 250, 0.5);
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--accent-coral);
    background: rgba(231, 111, 81, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--accent-coral);
    margin-bottom: 1rem;
}

.upload-btn {
    background-color: var(--accent-coral);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin: 0.5rem;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #d65c40;
}

.upload-note {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
}

/* Превью изображения */
#previewContainer {
    display: none;
    margin: 1.5rem 0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-header h5 {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.cancel-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2rem;
}

.preview-image-container {
    text-align: center;
    margin: 1rem 0;
}

#previewImage {
    max-width: 250px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.analyze-btn {
    background-color: var(--accent-green);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.analyze-btn:hover {
    background-color: #21867a;
}

/* Спиннер загрузки */
#loadingSpinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-coral);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Результат анализа */
#analysisResult {
    display: none;
    margin-top: 2rem;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.result-header h4 {
    color: var(--primary-blue);
    font-size: 1.3rem;
}

.result-time {
    font-size: 0.9rem;
    color: #888;
}

.result-content {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.analysis-text {
    line-height: 1.6;
    color: var(--slate-blue);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.continue-btn {
    background-color: var(--accent-coral);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.continue-btn:hover {
    background-color: #d65c40;
}

/* Сообщения об ошибках/успехе */
.error-message {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
    color: #e74c3c;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.success-message {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    color: #27ae60;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .hero {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .preview-actions,
    .result-actions {
        flex-direction: column;
    }
}
