* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.question-section {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.ai-selector {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
}

.selector-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #333;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
}

.checkbox-label:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    font-size: 1rem;
    font-weight: 500;
}

button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

.results-section {
    margin-top: 40px;
    animation: fadeIn 0.5s;
}

.results-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}


.responses-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}


.response-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px 24px;
    border: 2px solid #e0e0e0;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: slideIn 0.3s ease-out;
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
    max-width: 100%;
    word-break: break-word;
    white-space: pre-line;
}

.response-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.response-card.error {
    background: #fff3f3;
    border-color: #ffcccc;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.ai-icon {
    font-size: 1.5rem;
}

.response-header h3 {
    font-size: 1.3rem;
    color: #333;
}

.response-body {
    color: #555;
    line-height: 1.6;
}

.response-body p {
    margin-bottom: 10px;
}

.error-message {
    background: #fff3f3;
    border: 2px solid #ffcccc;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #d32f2f;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    opacity: 0.9;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .responses-grid {
        grid-template-columns: 1fr;
    }
}
