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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #3da702 0%, #2d7a02 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-title p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

main {
    flex: 1;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.step {
    padding: 40px;
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.step.active {
    display: block;
}

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

.step-header {
    margin-bottom: 30px;
}

.step-header h2 {
    color: #2d3748;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #3da702, #2d7a02);
    transition: width 0.5s ease;
}

.step-description {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: #3da702;
    box-shadow: 0 0 0 3px rgba(61, 167, 2, 0.1);
}

.btn-primary, .btn-secondary, .btn-outline {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3da702 0%, #2d7a02 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(61, 167, 2, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 167, 2, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #979797;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #979797;
}

.btn-outline {
    background: transparent;
    color: #3da702;
    border: 2px solid #3da702;
}

.btn-outline:hover {
    background: #3da702;
    color: white;
}

.question-item {
    margin-bottom: 20px;
    padding: 0;
}

.question-item label {
    margin-bottom: 10px;
    color: #2d3748;
}

#questionsContainer {
    margin-bottom: 30px;
}

.prompt-result {
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.prompt-header {
    background: #f7fafc;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
}

.prompt-header h3 {
    color: #2d3748;
    margin: 0;
}

.prompt-content {
    padding: 25px;
    background: #fff;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    color: #2d3748;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #feb2b2;
}

.success-message {
    background: #c6f6d5;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #9ae6b4;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .header-title h1 {
        font-size: 2rem;
    }

    .logout-btn {
        align-self: center;
    }

    .step {
        padding: 25px;
    }

    .actions {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary, .btn-outline {
        justify-content: center;
    }

    .prompt-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}
