/* Modern Quizify Styling */

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --text-dark: #1e293b;
    --text-medium: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    animation: fadeIn 0.8s ease;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.hero-note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Floating Cards */
.hero-image {
    position: relative;
    height: 300px;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: float 3s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 50%;
    right: 15%;
    animation-delay: 1s;
}

.floating-card.card-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Upload Section */
.upload-section-modern {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    margin-top: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeIn 1s ease 0.2s both;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.upload-box-modern {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.upload-box-modern:hover,
.upload-box-modern.dragover {
    border-color: var(--primary-color);
    background: #eef2ff;
    transform: scale(1.02);
}

.upload-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.upload-box-modern h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.upload-desc {
    color: var(--text-medium);
    margin: 1rem 0;
}

.browse-btn-modern {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

.browse-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.file-types-modern {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Selected File */
.selected-file-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

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

.file-icon {
    font-size: 2rem;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: #166534;
}

.file-status {
    font-size: 0.85rem;
    color: #16a34a;
}

.remove-btn-modern {
    background: none;
    border: none;
    color: var(--text-medium);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.remove-btn-modern:hover {
    color: var(--error);
}

/* Generate Button */
.generate-btn-modern {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn-modern:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.generate-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Section */
.status-section-modern {
    background: white;
    border-radius: 24px;
    padding: 4rem 3rem;
    margin-top: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease;
}

.status-content {
    text-align: center;
}

.spinner-modern {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.status-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.status-content p {
    color: var(--text-medium);
    font-size: 1rem;
}

/* Results Section */
.results-section-modern {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    margin-top: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.5s ease;
}

.results-header-modern {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.results-header-modern h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.results-info {
    color: var(--text-medium);
    font-size: 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-medium);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px 3px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Question Cards */
.question-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.question-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.question-number {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-text {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
    line-height: 1.6;
}

/* Options List */
.options-list {
    list-style: none;
    margin-bottom: 1rem;
}

.option {
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.option:hover:not(.answered) {
    background: #eef2ff;
    border-color: var(--primary-light);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.option.answered {
    cursor: default;
}

.option.correct {
    background: #f0fdf4;
    border-color: var(--success);
    color: #166534;
    font-weight: 600;
}

.option.wrong {
    background: #fef2f2;
    border-color: var(--error);
    color: #991b1b;
}

.option.selected {
    border-width: 3px;
}

/* Quiz Feedback */
.quiz-feedback {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.05rem;
}

.quiz-feedback.correct-feedback {
    background: #f0fdf4;
    color: #166534;
    border: 2px solid var(--success);
}

.quiz-feedback.wrong-feedback {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid var(--error);
}

/* Explanation */
.explanation {
    background: #fffbeb;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #92400e;
    margin-top: 1rem;
    border-left: 3px solid var(--warning);
}

.explanation strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #78350f;
}

/* Short Question Specific */
.expected-points {
    background: #eff6ff;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.expected-points strong {
    display: block;
    color: #1e40af;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.expected-points ul {
    margin-left: 1.5rem;
    color: #1e40af;
}

.expected-points li {
    margin-bottom: 0.5rem;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.easy {
    background: #d1fae5;
    color: #065f46;
}

.difficulty-badge.medium {
    background: #fed7aa;
    color: #92400e;
}

.difficulty-badge.hard {
    background: #fecaca;
    color: #991b1b;
}

/* New Upload Button */
.new-upload-btn-modern {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 2rem;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-upload-btn-modern:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

/* Past Uploads Section */
.past-uploads-section-modern {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.past-uploads-section-modern h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.upload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-item:hover {
    background: #eef2ff;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.upload-item-info {
    flex: 1;
}

.upload-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.upload-item-meta {
    font-size: 0.85rem;
    color: var(--text-medium);
}

.upload-item-status {
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upload-item-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.upload-item-status.processing {
    background: #dbeafe;
    color: #1e40af;
}

.upload-item-status.failed {
    background: #fecaca;
    color: #991b1b;
}

/* Empty/Loading States */
.loading-text,
.empty-text {
    color: var(--text-light);
    text-align: center;
    padding: 2rem 1rem;
    font-style: italic;
}

/* Footer */
.footer-modern {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-image {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .upload-section-modern,
    .results-section-modern,
    .past-uploads-section-modern {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .upload-box-modern {
        padding: 2rem 1rem;
    }

    .question-card {
        padding: 1.5rem;
    }

    .option {
        padding: 0.875rem 1rem;
    }
}
