/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #fafafa;
}

/* Utilities */
.hidden {
    display: none !important;
}

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

/* Tab Navigation */
.tab-navigation {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 2rem;
    gap: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 16px;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #4a5568;
    background: #f7fafc;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    padding: 4px;
}

.btn-close:hover {
    color: #2d3748;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#userName {
    font-weight: 500;
    color: #4a5568;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.hero-content {
    text-align: center;
    margin-bottom: 80px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.feature-card p {
    color: #4a5568;
    line-height: 1.5;
}

/* Generator Section */
.generator {
    padding: 60px 0;
    background: white;
}

.generator-header {
    text-align: center;
    margin-bottom: 60px;
}

.generator-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
}

.generator-header p {
    font-size: 18px;
    color: #4a5568;
}

/* Form Styles */
.generator-form {
    max-width: 800px;
    margin: 0 auto;
    background: #f7fafc;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

/* Slider */
.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    margin-right: 12px;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.slider-value {
    font-weight: 600;
    color: #2d3748;
    margin-left: 8px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.checkbox-item input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
}

/* Rate Limit Info */
.rate-limit-info {
    text-align: center;
    margin-top: 20px;
    padding: 12px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 6px;
    color: #22543d;
    font-size: 14px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a202c;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-left: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    animation: progress 10s ease-in-out forwards;
}

@keyframes progress {
    0% { width: 0%; }
    25% { width: 25%; }
    50% { width: 50%; }
    75% { width: 75%; }
    100% { width: 100%; }
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step.active .step-icon {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.step.completed .step-icon {
    background: #48bb78;
    color: white;
}

.step.completed .step-icon::before {
    content: '✓';
}

.step span {
    font-size: 12px;
    text-align: center;
    color: #4a5568;
    font-weight: 500;
}

/* Script Container */
.script-container {
    margin-bottom: 32px;
}

.script-code {
    background: #1a202c;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

/* Success Container */
.success-container {
    text-align: center;
    padding: 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-container h4 {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 12px;
}

.success-container p {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 24px;
}

.content-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.content-info {
    background: #f0fff4;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #48bb78;
    text-align: left;
}

.content-info p {
    margin-bottom: 12px;
    font-weight: 600;
    color: #22543d;
}

.content-info ul {
    margin-left: 20px;
    color: #2d3748;
}

.content-info li {
    margin-bottom: 8px;
}

/* Fallback Container */
.fallback-container .error-notice {
    background: #fff5f5;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #f56565;
    margin-bottom: 24px;
}

.fallback-container .error-notice p {
    color: #742a2a;
    margin: 0;
}

/* Choice Container */
.choice-container {
    max-width: 100%;
}

.choice-intro {
    text-align: center;
    margin-bottom: 32px;
}

.choice-intro p {
    font-size: 16px;
    color: #4a5568;
    margin: 0;
}

.choice-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.choice-option {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.choice-option:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.choice-primary {
    border-color: #667eea;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.choice-primary:hover {
    border-color: #5a67d8;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.choice-secondary {
    background: white;
}

.choice-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.choice-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.choice-option h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.choice-option p {
    color: #4a5568;
    margin-bottom: 16px;
    font-size: 14px;
}

.choice-steps {
    margin-bottom: 20px;
}

.choice-steps ol {
    margin-left: 20px;
    color: #2d3748;
}

.choice-steps li {
    margin-bottom: 8px;
    font-size: 14px;
}

.manual-script-section {
    border-top: 2px solid #e2e8f0;
    padding-top: 24px;
    margin-top: 24px;
}

/* Instructions */
.instructions {
    background: #f7fafc;
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Responsive for choice options */
@media (max-width: 768px) {
    .choice-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .choice-option {
        padding: 20px;
    }

    .choice-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

.instructions h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.instructions ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.instructions li {
    margin-bottom: 8px;
    color: #4a5568;
}

.instructions a {
    color: #667eea;
    text-decoration: none;
}

.instructions a:hover {
    text-decoration: underline;
}

.tutorial-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #a0aec0;
    text-align: center;
    padding: 40px 0;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    margin: 0 5px;
    font-size: 14px;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links span {
    margin: 0 5px;
    color: #718096;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 25%, #65a30d 75%, #eab308 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-logo-image {
    height: 160px;
    width: 160px;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .nav {
        flex-direction: column;
        gap: 16px;
    }

    .generator-form {
        padding: 24px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 24px;
    }
}

/* Quiz Preview Section */
.quiz-preview {
    background: white;
    padding: 60px 0;
    border-top: 1px solid #e2e8f0;
}

.preview-header {
    text-align: center;
    margin-bottom: 48px;
}

.preview-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.preview-header p {
    font-size: 18px;
    color: #4a5568;
}

.quiz-info {
    background: #f7fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.quiz-info h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.quiz-metadata {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.quiz-metadata span {
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.questions-container {
    margin-bottom: 32px;
}

.question-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.question-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.question-number {
    background: #667eea;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.question-type-badge {
    background: #e2e8f0;
    color: #4a5568;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.question-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    font-size: 14px;
}

.question-content textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 16px;
}

.question-explanation textarea {
    background: #f7fafc;
    font-size: 14px;
    min-height: 72px;
    width: 100%;
}

.question-options {
    margin-bottom: 16px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.option-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.option-item input[type="radio"] {
    margin: 0;
}

.option-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
}

.correct-indicator {
    color: #48bb78;
    font-weight: 600;
    font-size: 12px;
    margin-left: 8px;
}

.preview-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-outline {
    background: white;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.saved-quizzes {
    border-top: 1px solid #e2e8f0;
    padding-top: 32px;
}

.saved-quizzes h3, .saved-quizzes h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.saved-quizzes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.quiz-search {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 300px;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
}

.quiz-filters {
    display: flex;
    gap: 8px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.quiz-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-public {
    background: #d4edda;
    color: #155724;
}

.badge-private {
    background: #f8d7da;
    color: #721c24;
}

.badge-shared {
    background: #d1ecf1;
    color: #0c5460;
}

.quiz-details {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 4px;
}

.quiz-author {
    font-size: 12px;
    color: #718096;
    margin-bottom: 2px;
}

.quiz-date {
    font-size: 12px;
    color: #a0aec0;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.loading-quizzes, .error-message, .no-quizzes {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.error-message {
    color: #e53e3e;
}

.no-quizzes p {
    margin: 0;
}

.saved-quizzes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.saved-quiz-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.saved-quiz-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.saved-quiz-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.saved-quiz-meta {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 8px;
}

.saved-quiz-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Fallback Notice */
.fallback-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.notice-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
}

.notice-text strong {
    color: #856404;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.notice-text p {
    color: #856404;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.btn-sm {
    font-size: 12px;
    padding: 6px 12px;
}

/* Additional mobile styles for quiz preview */
@media (max-width: 768px) {
    .quiz-metadata {
        flex-direction: column;
        gap: 8px;
    }

    .question-header {
        flex-direction: column;
        gap: 12px;
    }

    .preview-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .saved-quizzes-list {
        grid-template-columns: 1fr;
    }

    .notice-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* Demo Section Styles */
.demo-section {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    text-align: center;
    color: white;
}

.demo-section h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.demo-section > p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.demo-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.demo-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    text-align: left;
}

.demo-info p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.demo-info ul {
    list-style: none;
    padding: 0;
}

.demo-info li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    padding-left: 0;
    opacity: 0.95;
}

/* Demo Modal Styles */
.modal .modal-content.large {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.demo-quiz-preview {
    padding: 1rem;
}

.quiz-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.quiz-info h4 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 1rem;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.quiz-meta .badge {
    background: #4299e1;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.sample-questions {
    margin-bottom: 2rem;
}

.sample-question {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.question-number {
    background: #4299e1;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.question-content {
    flex: 1;
}

.question-content h5 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
}

.question-options {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.option {
    padding: 0.8rem 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.option.correct {
    background: #c6f6d5;
    border-color: #68d391;
    color: #22543d;
    font-weight: 500;
}

.explanation {
    background: #edf2f7;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #4299e1;
    font-size: 0.95rem;
    color: #4a5568;
}

.questions-indicator {
    text-align: center;
    padding: 2rem;
    color: #718096;
    font-style: italic;
    background: #f8fafc;
    border-radius: 12px;
}

.demo-outcome {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.demo-outcome h4 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.demo-outcome p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.demo-outcome ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.demo-outcome li {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
}

/* Responsive Demo Styles */
@media (max-width: 768px) {
    .demo-section {
        margin-top: 2rem;
        padding: 2rem 1rem;
    }

    .demo-section h3 {
        font-size: 2rem;
    }

    .sample-question {
        flex-direction: column;
        gap: 1rem;
    }

    .question-number {
        align-self: flex-start;
    }

    .quiz-meta {
        justify-content: center;
    }

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

    .modal .modal-content.large {
        max-width: 95vw;
        margin: 5vh auto;
    }
}

/* Demo Generator Styles */
.demo-generator {
    max-width: 600px;
    margin: 0 auto;
}

.demo-notice {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.demo-notice .notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.demo-notice .notice-text strong {
    margin: 0 0 0.5rem 0;
    color: #0ea5e9;
    display: block;
}

.demo-notice .notice-text p {
    margin: 0;
    color: #334155;
}

.demo-topic-field {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
}

.demo-topic-field:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.demo-topic-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.demo-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.demo-info p {
    margin: 0 0 1rem 0;
    color: #475569;
    font-weight: 500;
}

.demo-info ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.demo-info li {
    color: #475569;
    font-size: 14px;
}

.demo-help {
    color: #64748b !important;
    font-style: italic;
    font-size: 12px !important;
    margin-top: 0.25rem;
    display: block;
}

.demo-save-content {
    text-align: center;
    padding: 1rem 0;
}

.demo-save-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.demo-save-content h4 {
    color: #1e293b;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.demo-save-content > p {
    color: #64748b;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

.demo-save-benefits {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    margin: 2rem 0;
}

.demo-save-benefits h5 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1rem;
}

.demo-save-benefits ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.demo-save-benefits li {
    color: #475569;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Question Type Selection Modal */
.question-type-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
}

.question-type-option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.question-type-option:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.question-type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.question-type-option h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.question-type-option p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Demo Quiz Preview Styles */
.demo-notice.template-notice {
    background: #f0f9ff;
    border: 1px solid #3b82f6;
}

.demo-notice.template-notice .notice-icon {
    color: #3b82f6;
}

.demo-notice.template-notice .notice-text strong {
    color: #3b82f6;
}

/* Additional responsive styles for demo */
@media (max-width: 768px) {
    .demo-generator {
        max-width: 100%;
    }

    .demo-notice {
        flex-direction: column;
        text-align: center;
    }

    .modal-footer {
        flex-direction: column;
    }

    .demo-save-content h4 {
        font-size: 1.25rem;
    }

    .question-type-choices {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .question-type-option {
        padding: 1rem;
    }
}

/* Validation Styles */
.validation-error {
    color: #d69e2e;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.375rem 0.75rem;
    background-color: #fefcbf;
    border: 1px solid #f6e05e;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-error::before {
    content: "⚠️";
    font-size: 0.75rem;
}

.validation-error-input {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 1px #e53e3e !important;
}

.validation-error-input:focus {
    border-color: #c53030 !important;
    box-shadow: 0 0 0 2px #fed7d7 !important;
}

.has-validation-errors {
    border: 2px solid #e53e3e;
    border-radius: 12px;
}

.btn-disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #cbd5e0 !important;
    border-color: #cbd5e0 !important;
    color: #718096 !important;
}

.btn-disabled:hover {
    background-color: #cbd5e0 !important;
    border-color: #cbd5e0 !important;
    transform: none !important;
}

/* Validation summary for better UX */
.validation-summary {
    background-color: #fefcbf;
    border: 1px solid #f6e05e;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
}

.validation-summary.show {
    display: block;
}

.validation-summary h4 {
    color: #d69e2e;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.validation-summary ul {
    color: #744210;
    font-size: 0.85rem;
    margin-left: 1rem;
}

.validation-summary li {
    margin-bottom: 0.25rem;
}