@charset "utf-8";
 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        html {
            line-height: 1.15;
            -webkit-text-size-adjust: 100%;
        }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .header {
            background: linear-gradient(135deg, #2c3e50, #34495e);
            color: white;
            padding: 30px;
            text-align: center;
        }
        .header h1 {
            font-size: 2.5em;
            margin-bottom: 15px;
            font-weight: 300;
        }
.intro-text {
    font-size: 1em;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 100%;
    margin: 0;
    text-align: left;
    padding: 0 10px;
}
        .main-content {
            padding: 40px;
            display: grid;
            gap: 30px;
        }
        .captcha-section {
            background: #f8f9fa;
            padding: 30px;
            border-radius: 15px;
            border: 2px solid #e9ecef;
        }
        .captcha-title {
            font-size: 1.5em;
            margin-bottom: 20px;
            color: #2c3e50;
            text-align: center;
        }
        .answers-container {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }
        .answer-checkbox {
            display: none;
        }
        .answer-label {
            padding: 12px 24px;
            border: 2px solid #3498db;
            background: white;
            color: #3498db;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1.1em;
            transition: all 0.3s ease;
            min-width: 120px;
            text-align: center;
            display: inline-block;
        }
        .answer-checkbox:checked + .answer-label {
            background: #3498db;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }
        .answer-label:hover {
            background: #3498db;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
        }
        .math-section {
            text-align: center;
            margin: 20px 0;
        }
        .math-example {
            font-size: 2em;
            font-weight: bold;
            color: #2c3e50;
            margin: 20px 0;
            font-family: 'Courier New', monospace;
        }
        .math-input {
            padding: 12px 20px;
            font-size: 1.2em;
            border: 2px solid #bdc3c7;
            border-radius: 10px;
            width: 200px;
            text-align: center;
            margin: 0 10px 15px 10px;
        }
        .submit-btn {
            padding: 12px 30px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s ease;
            display: block;
            margin: 0 auto;
        }
        .submit-btn:hover:not(:disabled) {
            background: #219a52;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
        }
        .submit-btn:disabled {
            background: #bdc3c7;
            cursor: not-allowed;
        }
        .message {
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            font-weight: bold;
            margin: 15px 0;
            transition: all 0.3s ease;
        }
        .error {
            background: #e74c3c;
            color: white;
        }
        .success {
            background: #27ae60;
            color: white;
        }
        .text-section {
            background: #f8f9fa;
            padding: 30px;
            border-radius: 15px;
            border: 2px solid #e9ecef;
        }
        .text-input {
            width: 100%;
            max-width: 768px;
            height: 300px;
            max-height: 1344px;
            padding: 20px;
            border: 2px solid #bdc3c7;
            border-radius: 10px;
            font-size: 1.1em;
            font-family: inherit;
            resize: vertical;
            margin-bottom: 15px;
            display: block;
            margin-left: auto;
            margin-right: auto;
        }
        .text-input:disabled {
            background: #ecf0f1;
            cursor: not-allowed;
            opacity: 0.6;
        }
        .char-counter {
            text-align: right;
            margin: -10px 0 15px 0;
            padding-right: calc((100% - 768px) / 2);
            max-width: 768px;
            margin-left: auto;
            margin-right: auto;
        }
        .image-section {
            text-align: center;
            margin: 30px 0;
        }
        .generated-image {
            max-width: 540px;
            max-height: 945px;
            width: 100%;
            height: auto;
            border: 3px solid #2c3e50;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        .save-btn {
            padding: 15px 40px;
            background: #e67e22;
            color: white;
            border: none;
            border-radius: 25px;
            font-size: 1.2em;
            cursor: pointer;
            margin: 20px 0;
            transition: all 0.3s ease;
        }
        .save-btn:hover {
            background: #d35400;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(230, 126, 34, 0.3);
        }
        .recommendation {
            color: #7f8c8d;
            font-size: 0.9em;
            text-align: center;
            margin: 10px 0;
        }
        .footer {
            background: #2c3e50;
            color: white;
            text-align: center;
            padding: 30px;
            margin-top: 40px;
        }
        @media (max-width: 768px) {
            .container {
                margin: 10px;
                border-radius: 15px;
            }
            .header h1 {
                font-size: 2em;
            }
            .main-content {
                padding: 20px;
            }
            .answers-container {
                flex-direction: column;
                align-items: center;
            }
            .answer-label {
                width: 200px;
            }
            .math-example {
                font-size: 1.5em;
            }
            .text-input {
                height: 200px;
            }
            .math-input {
                margin-bottom: 15px;
            }
            .generated-image {
                max-width: 100%;
                max-height: 1890px;
            }
            .char-counter {
                padding-right: 20px;
            }
        }
        @media (max-width: 480px) {
            body {
                padding: 10px;
            }
            .header {
                padding: 20px;
            }
            .header h1 {
                font-size: 1.8em;
            }
            .intro-text {
                font-size: 1em;
            }
            .captcha-section, .text-section {
                padding: 20px;
            }
            .math-input {
                width: 150px;
                font-size: 1em;
            }
            .char-counter {
                padding-right: 10px;
            }
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fade-in {
            animation: fadeIn 0.5s ease-out;
        }
        .hidden {
            display: none;
        }
        .loading {
            opacity: 0.7;
            pointer-events: none;
        }

