/* ===================================
   Neumorphism Interview Questions App
   =================================== */

/* CSS Variables */
:root {
    --primary-color: #6C63FF;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #4CAF50;
    --secondary-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --background: #e0e5ec;
    --surface: #e0e5ec;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #f44336;
    --info: #2196F3;
    
    /* Enhanced Neumorphic shadows with depth */
    --neu-shadow: 9px 9px 18px var(--shadow-dark), -9px -9px 18px var(--shadow-light);
    --neu-shadow-inset: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    --neu-shadow-small: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    --neu-shadow-hover: 14px 14px 28px var(--shadow-dark), -14px -14px 28px var(--shadow-light);
    --neu-shadow-active: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    
    /* Glassmorphism effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    
    /* Transition speeds */
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #7b72ff;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #52b954;
    --secondary-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --background: #1a1a2e;
    --surface: #16213e;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0a0;
    --shadow-light: #1f2a44;
    --shadow-dark: #0d1117;
    --success: #52b954;
    --warning: #ffa726;
    --error: #ef5350;
    --info: #42a5f5;
    
    /* Dark theme neumorphic shadows */
    --neu-shadow: 9px 9px 18px var(--shadow-dark), -9px -9px 18px var(--shadow-light);
    --neu-shadow-inset: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    --neu-shadow-small: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    --neu-shadow-hover: 14px 14px 28px var(--shadow-dark), -14px -14px 28px var(--shadow-light);
    --neu-shadow-active: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated background gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(108, 99, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(76, 175, 80, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.container {
    position: relative;
    z-index: 1;
}

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

/* Header */
.header {
    background: var(--surface);
    padding: 20px 0;
    box-shadow: var(--neu-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
}

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

/* Neumorphic Button */
.neu-button {
    background: var(--surface);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--neu-shadow);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.neu-button:hover {
    box-shadow: var(--neu-shadow-hover);
    transform: translateY(-2px);
}

.neu-button:active {
    box-shadow: var(--neu-shadow-inset);
    transform: translateY(0);
}

.neu-button.primary {
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
    box-shadow: var(--neu-shadow);
}

.neu-button.primary:hover {
    background: linear-gradient(145deg, #8a81ff, #7b72ff);
}

.neu-button.small {
    padding: 8px 16px;
    font-size: 13px;
}

.neu-button.secondary {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: var(--neu-shadow), 0 0 20px rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.neu-button.secondary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.neu-button.secondary:hover {
    background: linear-gradient(135deg, #1ed760 0%, #4CAF50 100%);
    box-shadow: var(--neu-shadow-hover), 0 0 30px rgba(76, 175, 80, 0.5);
    transform: translateY(-3px) scale(1.05);
}

/* Neumorphic Card */
.neu-card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--neu-shadow);
    padding: 25px;
    transition: all 0.3s ease;
}

/* Search Section */
.search-section {
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    margin-bottom: 25px;
}

.search-bar i {
    color: var(--text-secondary);
    font-size: 18px;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

/* Filters */
.filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-pills,
.type-pills,
.difficulty-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill {
    background: var(--surface);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: var(--neu-shadow-small);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--neu-shadow);
}

.pill.active {
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
    box-shadow: var(--neu-shadow);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
}

.stat-card i {
    font-size: 40px;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Questions Section */
.questions-section {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.view-options {
    display: flex;
    gap: 10px;
}

.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.question-card {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--neu-shadow);
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.question-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--neu-shadow-hover);
}

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

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

.badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.category {
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
}

.badge.type {
    background: linear-gradient(145deg, #52b954, #4CAF50);
    color: white;
}

.badge.difficulty-easy {
    background: linear-gradient(145deg, #52b954, #4CAF50);
    color: white;
}

.badge.difficulty-medium {
    background: linear-gradient(145deg, #ffa726, #FF9800);
    color: white;
}

.badge.difficulty-hard {
    background: linear-gradient(145deg, #ef5350, #f44336);
    color: white;
}

.favorite-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.favorite-btn.active {
    color: #FFD700;
}

.question-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.question-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: var(--surface);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    box-shadow: var(--neu-shadow-small);
}

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

.icon-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 5px;
}

.icon-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.answered-indicator {
    color: var(--success);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results p {
    font-size: 18px;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-primary);
}

.close-btn {
    background: var(--surface);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--neu-shadow-small);
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.close-btn:hover {
    box-shadow: var(--neu-shadow);
    color: var(--error);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--neu-shadow-inset);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: var(--neu-shadow-inset), 0 0 0 3px rgba(108, 99, 255, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-group small a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Question Detail */
.question-detail {
    margin-bottom: 30px;
}

.question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.question-detail h3 {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* Answer Section */
.answer-section {
    background: var(--surface);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--neu-shadow-inset);
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.answer-header h4 {
    font-size: 18px;
    color: var(--text-primary);
}

.ai-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.answer-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    min-height: 150px;
    line-height: 1.8;
    color: var(--text-primary);
}

.answer-content .placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

.answer-content pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
}

.answer-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Settings */
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--surface);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--neu-shadow-hover);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 20px;
    color: var(--success);
}

.toast span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .questions-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        max-width: 100%;
    }
    
    .answer-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ai-options {
        width: 100%;
    }
    
    .ai-options button {
        flex: 1;
    }
}

/* Tabs Section */
.tabs-section {
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tabs-nav {
    flex: 1;
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-btn {
    background: var(--surface);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--neu-shadow);
}

.tab-btn.active {
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
    box-shadow: var(--neu-shadow);
}

.tab-btn i {
    font-size: 16px;
}

.tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Manage Jobs Modal Styles */
.add-job-input {
    display: flex;
    gap: 10px;
}

.add-job-input input {
    flex: 1;
}

.jobs-list-section {
    margin-top: 25px;
}

.jobs-list-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.job-item {
    background: var(--surface);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.job-item:hover {
    box-shadow: var(--neu-shadow);
}

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

.job-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.job-item-details h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.job-item-details p {
    font-size: 12px;
    color: var(--text-secondary);
}

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

.job-item.default {
    opacity: 0.7;
}

.job-item.default .job-item-actions button {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dark theme specific adjustments */
[data-theme="dark"] .answer-content {
    background: #0d1117;
}

[data-theme="dark"] .answer-content pre {
    background: #1a1a2e;
}

[data-theme="dark"] .answer-content code {
    background: #1a1a2e;
}

/* Flashcard Generator Styles */
.flashcard-generator-container {
    min-height: 400px;
}

.generator-step {
    animation: fadeIn 0.3s ease;
}

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

.step-header h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-header .help-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.upload-tab {
    flex: 1;
    background: var(--surface);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--neu-shadow-small);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-tab:hover {
    box-shadow: var(--neu-shadow);
}

.upload-tab.active {
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    color: white;
    box-shadow: var(--neu-shadow);
}

.upload-content {
    display: none;
}

.upload-content.active {
    display: block;
}

/* File Dropzone */
.file-dropzone {
    text-align: center;
    padding: 60px 40px;
    border: 3px dashed var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface);
}

.file-dropzone:hover {
    border-color: var(--primary-color);
    box-shadow: var(--neu-shadow-hover);
}

.file-dropzone.drag-over {
    border-color: var(--primary-color);
    background: rgba(108, 99, 255, 0.05);
    box-shadow: var(--neu-shadow-hover);
}

.file-dropzone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.file-dropzone h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.file-dropzone p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.file-dropzone small {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Uploaded File Display */
.uploaded-file {
    background: var(--surface);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--neu-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-info i {
    font-size: 32px;
    color: var(--primary-color);
}

.file-details h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.file-details p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Configuration Section */
.config-section {
    background: var(--surface);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--neu-shadow-inset);
    margin-bottom: 25px;
}

.config-section h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Slider Container */
.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: var(--surface);
    box-shadow: var(--neu-shadow-inset);
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    cursor: pointer;
    box-shadow: var(--neu-shadow-small);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(145deg, #7b72ff, #6C63FF);
    cursor: pointer;
    border: none;
    box-shadow: var(--neu-shadow-small);
}

.slider-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 16px;
}

/* Character Count */
#charCount {
    display: block;
    text-align: right;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 5px;
}

/* Progress Container */
.progress-container {
    text-align: center;
    padding: 60px 40px;
}

.progress-icon {
    margin-bottom: 25px;
}

.progress-icon i {
    font-size: 64px;
    color: var(--primary-color);
}

.progress-container h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.progress-container p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--neu-shadow-inset);
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6C63FF, #7b72ff, #8a81ff);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

#progressPercent {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

/* Preview Actions */
.preview-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.selected-count {
    margin-left: auto;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

/* Flashcards Preview */
.flashcards-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
    margin-bottom: 25px;
}

.preview-flashcard {
    background: var(--surface);
    border-radius: 15px;
    box-shadow: var(--neu-shadow);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.preview-flashcard.selected {
    box-shadow: var(--neu-shadow-hover);
    border: 2px solid var(--primary-color);
}

.preview-flashcard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.preview-flashcard-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-flashcard-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.preview-flashcard-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 14px;
}

.preview-flashcard-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.preview-flashcard-content {
    margin-bottom: 15px;
}

.preview-flashcard-content h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-question-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--background);
    border-radius: 10px;
    box-shadow: var(--neu-shadow-inset);
}

.preview-answer-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 15px;
    background: var(--background);
    border-radius: 10px;
    box-shadow: var(--neu-shadow-inset);
}

.preview-flashcard-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.edit-flashcard-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.edit-flashcard-btn:hover {
    background: var(--surface);
    box-shadow: var(--neu-shadow-small);
}

/* Edit Mode */
.preview-flashcard.edit-mode .preview-question-text,
.preview-flashcard.edit-mode .preview-answer-text {
    background: white;
    box-shadow: none;
    border: 2px solid var(--primary-color);
}

.preview-flashcard.edit-mode textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.preview-flashcard.edit-mode textarea:focus {
    outline: none;
}

/* Responsive Design for Flashcard Generator */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .upload-tabs {
        flex-direction: column;
    }
    
    .file-dropzone {
        padding: 40px 20px;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .selected-count {
        margin-left: 0;
    }
    
    .flashcards-preview {
        max-height: 400px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--shadow-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

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

.question-card {
    animation: fadeIn 0.5s ease;
}

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

.tab-btn {
    animation: slideIn 0.3s ease;
}
