* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Main App Styles */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.header .subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
}

.header .quote {
    font-size: 1em;
    opacity: 0.8;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin: 0 15%;
}

.main-content {
    padding: 40px;
}

.intro-section {
    background: #eef2ff;
    border-left: 5px solid #667eea;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #333;
}

.intro-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.intro-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.intro-section ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.intro-section li {
    background: #dbe4ff;
    color: #435b8b;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
}

.api-key-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.api-key-section h3 {
    color: #856404;
    margin-bottom: 15px;
}

.api-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.save-api-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.input-section {
    margin-bottom: 30px;
}

.input-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-top: 15px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.analyze-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.validation-message {
    color: #c82333;
    font-weight: 500;
    margin-top: 10px;
    min-height: 20px;
}


/* Question Flow Styles */
.question-flow-section {
    margin-top: 30px;
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.question-card {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 25px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.question-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
}

.question-card h3::before {
    content: '❓';
    margin-right: 10px;
    font-size: 1.2em;
}

.question-text {
    color: #555;
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.question-category {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

.answer-input {
    width: 100%;
    min-height: 80px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}

.answer-input:focus {
    outline: none;
    border-color: #667eea;
}

.answer-placeholder {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
    font-style: italic;
}

.next-question-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
}

.skip-question-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
}

/* Final Analysis Styles */
.final-analysis-section {
    margin-top: 30px;
    display: none;
}

.analysis-section {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.analysis-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.analysis-header::before {
    margin-right: 12px;
    font-size: 1.4em;
}

.strengths-header::before { content: '✨'; }
.weaknesses-header::before { content: '⚠️'; }
.pitfalls-header::before { content: '🚨'; }
.blindspots-header::before { content: '👁️'; }
.recommendations-header::before { content: '📋'; }
.verdict-header::before { content: '⚖️'; }

.analysis-content {
    padding: 25px;
    line-height: 1.8;
    color: #333;
    font-size: 16px;
}

.analysis-content p {
    margin-bottom: 18px;
    text-align: justify;
}

.analysis-content p:last-child {
    margin-bottom: 0;
}

.qa-summary {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.qa-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.qa-question {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 15px;
}

.qa-answer {
    color: #666;
    font-style: italic;
    line-height: 1.5;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.restart-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .main-content {
        padding: 20px;
    }
}