/* analysis.html — page styles (extracted from the template) */

        body {
            background-color: var(--background);
            color: var(--text-dark);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Гамбургер меню */
        .hamburger-menu {
            display: flex;
            flex-direction: column;
            cursor: pointer;
            padding: 12px;
            gap: 4px;
            z-index: 2001;
            border-radius: 8px;
            transition: all 0.3s ease;
            background: rgba(139, 69, 19, 0.05);
            margin-right: 15px;
        }

        .hamburger-menu:hover {
            background: rgba(139, 69, 19, 0.1);
            transform: scale(1.05);
        }

        .hamburger-line {
            width: 25px;
            height: 3px;
            background: var(--primary);
            border-radius: 2px;
            transition: all 0.3s ease;
            transform-origin: center;
        }

        .hamburger-menu.active {
            background: rgba(139, 69, 19, 0.15);
        }

        .hamburger-menu.active .hamburger-line:nth-child(1) {
            transform: rotate(45deg) translate(6px, 6px);
            background: var(--primary);
        }

        .hamburger-menu.active .hamburger-line:nth-child(2) {
            opacity: 0;
            transform: scale(0);
        }

        .hamburger-menu.active .hamburger-line:nth-child(3) {
            transform: rotate(-45deg) translate(6px, -6px);
            background: var(--primary);
        }

        /* Боковое меню */
        .sidebar-menu {
            position: fixed;
            top: 0;
            left: -420px;
            width: 380px;
            height: 100vh;
            background: linear-gradient(160deg, var(--white) 0%, #faf9f7 50%, #F3E9DA 100%);
            box-shadow: 15px 0 50px rgba(139, 69, 19, 0.15);
            z-index: 2000;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            padding: 0;
            overflow-y: auto;
            border-right: 1px solid rgba(139, 69, 19, 0.08);
        }

        .sidebar-menu.active {
            left: 0;
            transform: translateX(0);
        }

        .menu-header {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
            padding: 30px 35px;
            color: white;
            position: relative;
            overflow: hidden;
            margin-bottom: 20px;
        }

        .menu-title {
            font-size: 1.7rem;
            font-weight: 700;
            margin: 0;
            position: relative;
            z-index: 2;
        }

        .menu-subtitle {
            font-size: 0.9rem;
            opacity: 0.9;
            margin-top: 5px;
            font-weight: 400;
            position: relative;
            z-index: 2;
        }

        

        .menu-section {
            margin-bottom: 30px;
            padding: 0 25px;
        }

        .menu-section-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid rgba(139, 69, 19, 0.1);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .menu-links {
            list-style: none;
        }

        .menu-links li {
            margin-bottom: 8px;
        }

        .menu-links a {
            color: var(--text-dark);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 14px 18px;
            border-radius: 12px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-weight: 500;
        }

        .menu-links a:hover {
            background: rgba(139, 69, 19, 0.05);
            color: var(--primary);
            transform: translateX(8px);
        }

        .menu-links a.active {
            background: linear-gradient(135deg, rgba(139, 69, 19, 0.1) 0%, rgba(230, 126, 34, 0.05) 100%);
            color: var(--primary);
            border-left: 3px solid var(--primary);
        }

        .menu-icon {
            font-size: 1.3rem;
            width: 24px;
            text-align: center;
            transition: transform 0.3s ease;
            flex-shrink: 0;
        }

        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .menu-overlay.active {
            display: block;
            opacity: 1;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -10%;
            width: 600px;
            height: 600px;
            background: radial-gradient(circle, rgba(139, 69, 19, 0.05) 0%, transparent 70%);
            border-radius: 50%;
        }

        .hero h1 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 20px;
            background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero p {
            font-size: 1.2rem;
            color: var(--text-light);
            margin-bottom: 40px;
            line-height: 1.7;
        }

        /* Analysis Form */
        .analysis-form-container {
            background: var(--white);
            border-radius: 20px;
            padding: 40px;
            box-shadow: var(--shadow);
            margin-bottom: 40px;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

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

        .form-label {
            display: block;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-dark);
            margin-bottom: 12px;
        }

        .text-input {
            width: 100%;
            min-height: 200px;
            padding: 20px;
            border: 2px solid var(--gray-light);
            border-radius: 12px;
            font-size: 1rem;
            line-height: 1.6;
            resize: vertical;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .text-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
        }

        .file-upload {
            border: 2px dashed var(--gray-light);
            border-radius: 12px;
            padding: 40px;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .file-upload:hover {
            border-color: var(--primary);
            background: rgba(139, 69, 19, 0.02);
        }

        .file-upload input {
            display: none;
        }

        .upload-icon {
            font-size: 3rem;
            margin-bottom: 15px;
            color: var(--primary);
        }

        .analysis-options {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .option-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 15px;
            background: var(--gray-light);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .option-checkbox:hover {
            background: rgba(139, 69, 19, 0.05);
        }

        .option-checkbox input {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
        }

        .submit-btn {
            background: var(--gradient);
            color: white;
            border: none;
            padding: 16px 40px;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: block;
            width: 100%;
            margin-top: 20px;
        }

        .submit-btn:hover {
            background: var(--gradient-light);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(139, 69, 19, 0.3);
        }

        .submit-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Results Section */
        .results-section {
            display: none;
            margin-top: 40px;
        }

        .analysis-card {
            background: var(--white);
            border-radius: 20px;
            padding: 40px;
            box-shadow: var(--shadow);
            margin-bottom: 30px;
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .analysis-section {
            margin-bottom: 35px;
            padding: 25px;
            background: var(--gray-light);
            border-radius: 15px;
            border-left: 4px solid var(--primary);
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .section-content {
            line-height: 1.8;
            color: var(--text-dark);
        }

        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .metric-card {
            background: white;
            padding: 20px;
            border-radius: 12px;
            text-align: center;
            box-shadow: var(--shadow);
        }

        .metric-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary);
            margin-bottom: 5px;
        }

        .metric-label {
            color: var(--text-light);
            font-size: 0.9rem;
        }

        .loading {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-light);
            display: none;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 4px solid #F0E6D6;
            border-top: 4px solid var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 25px;
        }

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

        .error-state {
            text-align: center;
            padding: 30px;
            background: #f8d7da;
            color: #B3423A;
            border-radius: 15px;
            border-left: 4px solid #B3423A;
            display: none;
        }

        /* Responsive Design */
        @media (max-width: 768px) {

            .hero h1 {
                font-size: 2.2rem;
            }

            .analysis-form-container {
                padding: 25px;
            }

            .analysis-options {
                grid-template-columns: 1fr;
            }

            .hamburger-menu {
                display: flex;
            }
}

        @media (max-width: 480px) {

            .sidebar-menu {
                width: 100%;
                left: -100%;
            }

            .hero h1 {
                font-size: 1.8rem;
            }

            .text-input {
                min-height: 150px;
            }
}

        .close-menu {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 2002; /* Важно: должен быть выше чем меню */
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Убедитесь что оверлей закрывает всё */
