:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e1e5f2;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --card-bg: rgba(30, 30, 40, 0.95);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #3a3a4a;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-gradient);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 32px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-toggle {
    background: var(--border-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 20px;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    background: var(--bg-gradient);
    color: white;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--border-color);
    padding: 6px;
    border-radius: 15px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.nav-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-btn.active {
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.nav-btn.active::before {
    opacity: 1;
}

.nav-btn i {
    font-size: 18px;
    transition: var(--transition);
}

.nav-btn:hover i {
    transform: scale(1.2);
}

/* Card Styles */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

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

.card-header {
    background: var(--bg-gradient);
    color: white;
    padding: 30px 35px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.card-header p {
    opacity: 0.95;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

.card-body {
    padding: 35px;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Quiz Info Section */
.quiz-info {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.quiz-info::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--bg-gradient);
}

.quiz-title-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.quiz-title-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.quiz-description-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    resize: vertical;
    min-height: 90px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.quiz-description-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Input Sections */
.input-section {
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    color: var(--primary-color);
    font-size: 20px;
}

.btn-paste {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--info-color), #3182ce);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(66, 153, 225, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-paste::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-paste:hover::before {
    width: 200px;
    height: 200px;
}

.btn-paste:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.5);
}

.btn-paste:active {
    transform: translateY(0);
}

.btn-paste i {
    position: relative;
    z-index: 1;
    font-size: 16px;
}

.btn-paste span {
    position: relative;
    z-index: 1;
}

textarea {
    width: 100%;
    min-height: 220px;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    resize: vertical;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

textarea::placeholder {
    color: #999;
    line-height: 1.8;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(72, 187, 120, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e53e3e);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 101, 101, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled::before {
    display: none;
}

.btn i {
    position: relative;
    z-index: 1;
}

.btn span {
    position: relative;
    z-index: 1;
}

/* Quiz Controls */
.quiz-controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: end;
    gap: 20px;
    margin-top: 25px;
}

.quiz-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-selector {
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    min-width: 280px;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-selector:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quiz-selector:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.quiz-selector option {
    color: var(--text-primary);
    background: var(--card-bg);
    padding: 10px;
}

.shuffle-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    padding: 14px 20px;
    border-radius: 12px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    user-select: none;
}

.shuffle-option:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shuffle-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: white;
    cursor: pointer;
    margin: 0;
}

.shuffle-option i {
    font-size: 16px;
}

.shuffle-option:has(input:checked) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Quiz List */
.quiz-list {
    display: grid;
    gap: 25px;
}

.quiz-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.quiz-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--bg-gradient);
    transform: scaleY(0);
    transition: var(--transition);
}

.quiz-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.quiz-item:hover::before {
    transform: scaleY(1);
}

.quiz-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

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

.quiz-item-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quiz-item-info h3::before {
    content: '📝';
    font-size: 24px;
}

.quiz-item-info p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.quiz-item-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.quiz-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.quiz-item-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Empty State */
.empty-state, .quiz-placeholder, .results-placeholder {
    text-align: center;
    padding: 80px 30px;
    color: var(--text-secondary);
}

.empty-state i, .quiz-placeholder i, .results-placeholder i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
}

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

.empty-state h3, .quiz-placeholder h3, .results-placeholder h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.empty-state p, .quiz-placeholder p, .results-placeholder p {
    font-size: 16px;
    opacity: 0.8;
}

/* Quiz Container */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 16px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.quiz-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--bg-gradient);
}

.quiz-info-display h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.quiz-info-display p {
    color: var(--text-secondary);
    font-size: 15px;
}

.quiz-progress {
    text-align: right;
    font-size: 15px;
    color: var(--text-secondary);
}

.quiz-progress div {
    margin-bottom: 8px;
    font-weight: 600;
}

#quiz-timer {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.question-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    animation: slideIn 0.5s ease;
}

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

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.question-number {
    background: var(--bg-gradient);
    color: white;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.question-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.7;
    flex: 1;
}

.options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--bg-gradient);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.option::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 14px;
}

.option:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(8px) scale(1.01);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.option:hover::before {
    transform: scaleY(1);
}

.option:hover::after {
    opacity: 1;
}

.option.selected {
    border-color: var(--primary-color);
    border-width: 3px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateX(10px) scale(1.02);
    animation: selectPulse 0.5s ease;
}

@keyframes selectPulse {
    0% {
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(12px) scale(1.03);
    }
    100% {
        transform: translateX(10px) scale(1.02);
    }
}

.option.selected::before {
    transform: scaleY(1);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

.option.selected::after {
    opacity: 1;
}

/* Custom Radio Button */
.option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border: 2.5px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    flex-shrink: 0;
    z-index: 1;
}

.option input[type="radio"]:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.option input[type="radio"]:checked {
    border-color: var(--primary-color);
    border-width: 2.5px;
    background: white;
    animation: radioCheck 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes radioCheck {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.option input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-gradient);
    animation: radioInner 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

@keyframes radioInner {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    animation: radioPulse 0.6s ease-out;
}

@keyframes radioPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.option-label {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 32px;
    font-size: 17px;
    z-index: 1;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.option.selected .option-label {
    color: var(--primary-color);
    transform: scale(1.1);
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.option-text {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.7;
    z-index: 1;
    transition: all 0.3s ease;
}

.option.selected .option-text {
    font-weight: 500;
    color: var(--text-primary);
}

.option:active {
    transform: translateX(6px) scale(0.99);
}

/* Submit Section */
.quiz-submit {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 3px dashed var(--primary-color);
    margin-top: 30px;
}

/* Results Styles */
.results-header {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
    border-radius: 20px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(72, 187, 120, 0.3);
    transition: var(--transition);
}

.results-header.excellent {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 40px rgba(240, 147, 251, 0.4);
}

.results-header.good {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 40px rgba(79, 172, 254, 0.4);
}

.results-header.average {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 10px 40px rgba(67, 233, 123, 0.4);
}

.results-header.needs-improvement {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 10px 40px rgba(250, 112, 154, 0.4);
}

.results-header::before {
    content: '🎉';
    position: absolute;
    font-size: 100px;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.performance-badge {
    font-size: 80px;
    margin-bottom: 15px;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.quiz-title-result {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 20px;
    font-weight: 500;
}

.score-display {
    font-size: 72px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-text {
    font-size: 20px;
    opacity: 0.95;
    font-weight: 500;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-gradient);
}

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

.stat-number {
    font-size: 36px;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 10px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.results-details h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-question {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.result-question:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.result-question.correct {
    border-left-color: var(--success-color);
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.05), rgba(56, 161, 105, 0.05));
}

.result-question.incorrect {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.05), rgba(229, 62, 62, 0.05));
}

.result-question-text {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
}

.result-answers {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.your-answer {
    margin-bottom: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.correct-answer {
    font-weight: 600;
    color: var(--success-color);
}

.incorrect-answer {
    color: var(--danger-color);
    font-weight: 600;
}

/* Action Buttons Container */
.action-buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 35px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

.btn-review {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-review:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

/* Review Section */
.review-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.5s ease;
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
}

.review-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close-review {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 10px rgba(245, 101, 101, 0.3);
}

.btn-close-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.5);
}

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

.question-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correct-badge {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    box-shadow: 0 3px 10px rgba(72, 187, 120, 0.3);
}

.incorrect-badge {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
    box-shadow: 0 3px 10px rgba(245, 101, 101, 0.3);
}

.result-options {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.result-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    transition: var(--transition);
    position: relative;
}

.result-option .option-letter {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 30px;
    font-size: 16px;
}

.result-option .option-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
}

.correct-option {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
    border-width: 3px;
}

.wrong-option {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(229, 62, 62, 0.1));
    border-width: 3px;
}

.correct-icon {
    color: var(--success-color);
    font-size: 20px;
    margin-left: auto;
}

.wrong-icon {
    color: var(--danger-color);
    font-size: 20px;
    margin-left: auto;
}

.your-choice-badge {
    position: absolute;
    top: -10px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.no-answer-notice {
    margin-top: 15px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(237, 137, 54, 0.1), rgba(246, 173, 85, 0.1));
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    color: var(--warning-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--bg-gradient);
    color: white;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-input, .modal-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.modal-input:focus, .modal-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.modal-textarea {
    min-height: 90px;
    resize: vertical;
}

.edit-questions {
    max-height: 350px;
    overflow-y: auto;
}

.edit-question-item {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
}

.edit-question-item h4 {
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 16px;
}

.edit-question-item input, .edit-question-item textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    transition: var(--transition);
}

.edit-question-item input:focus, .edit-question-item textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-question-item textarea {
    min-height: 70px;
}

.edit-options {
    display: grid;
    gap: 10px;
}

.edit-option {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edit-option span {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 25px;
}

.edit-option input {
    flex: 1;
    margin-bottom: 0;
}

.edit-option select {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
}

.modal-footer {
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 2px solid var(--border-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 18px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 5px solid var(--primary-color);
    z-index: 2000;
    animation: slideInRight 0.4s ease, slideOutRight 0.4s ease 2.6s;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast i {
    font-size: 24px;
}

.toast.success i {
    color: var(--success-color);
}

.toast.error i {
    color: var(--danger-color);
}

.toast.warning i {
    color: var(--warning-color);
}

/* Progress Bar */
.progress-bar-container {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--border-color);
    z-index: 100;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-bar {
    height: 100%;
    background: var(--bg-gradient);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px 25px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .nav-tabs {
        gap: 6px;
        padding: 5px;
    }
    
    .nav-btn {
        padding: 12px 16px;
        font-size: 14px;
        gap: 8px;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .card-header {
        padding: 25px;
    }
    
    .card-header h2 {
        font-size: 20px;
    }
    
    .card-body {
        padding: 25px;
    }
    
    .quiz-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .quiz-control-group {
        width: 100%;
    }
    
    .quiz-selector {
        width: 100%;
        min-width: auto;
    }
    
    .shuffle-option {
        width: 100%;
        justify-content: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
    
    .quiz-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .quiz-progress {
        text-align: center;
    }
    
    #quiz-timer {
        font-size: 24px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .option {
        padding: 15px;
    }
    
    .option-text {
        font-size: 15px;
    }
    
    .results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .score-display {
        font-size: 56px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .toast {
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 24px;
    }
    
    .nav-btn {
        padding: 10px 12px;
    }
    
    .nav-btn i {
        font-size: 16px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .results-stats {
        grid-template-columns: 1fr;
    }
    
    .score-display {
        font-size: 48px;
    }
    
    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 5px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

.scale-in {
    animation: scaleIn 0.5s ease;
}

/* AI Tab Styles */
.ai-info-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(49, 130, 206, 0.1));
    border-left: 4px solid var(--info-color);
    border-radius: 12px;
    margin-bottom: 25px;
}

.ai-info-box i {
    font-size: 24px;
    color: var(--info-color);
    margin-top: 2px;
}

.ai-info-box strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.ai-info-box p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.ai-settings {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 2px solid var(--border-color);
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-link {
    color: var(--info-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.api-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.ai-input {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.ai-input:focus {
    outline: none;
    border-color: var(--info-color);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
    transform: translateY(-2px);
}

.api-note {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
}

.btn-ai {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-ai::after {
    content: '🤖';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.7;
}

.btn-ai:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.5);
}

.ai-loading {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    margin-top: 30px;
}

.loading-spinner-large {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 6px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.ai-loading p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.ai-loading small {
    color: var(--text-secondary);
    font-size: 14px;
}

.ai-preview {
    margin-top: 30px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-md);
    animation: slideUp 0.5s ease;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.preview-content {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.preview-question {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition);
    position: relative;
}

.preview-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: var(--bg-gradient);
    border-radius: 16px 0 0 16px;
}

.preview-question:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.preview-question-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.preview-question-number {
    background: var(--bg-gradient);
    color: white;
    min-width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.preview-question-text {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
}

.preview-options {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
}

.preview-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    transition: var(--transition);
}

.preview-option.correct {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.1), rgba(56, 161, 105, 0.1));
}

.preview-option-letter {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 25px;
    font-size: 15px;
}

.preview-option.correct .preview-option-letter {
    color: var(--success-color);
}

.preview-option-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}

.preview-option.correct::after {
    content: '✓';
    color: var(--success-color);
    font-size: 20px;
    font-weight: 700;
}

.preview-correct-answer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--success-color), #38a169);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(72, 187, 120, 0.3);
}

.preview-actions {
    padding-top: 25px;
    border-top: 3px solid var(--border-color);
}

.quiz-name-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

.quiz-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Editable Preview Mode */
.preview-question.editable {
    cursor: pointer;
}

.preview-question.editable:hover {
    border-color: var(--info-color);
}

.preview-question.editing {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.preview-question.editing .preview-question-text {
    border: 2px solid var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    background: white;
}

.preview-question.editing .preview-option-text {
    border: 2px solid var(--border-color);
    padding: 8px;
    border-radius: 6px;
    background: white;
}

.preview-question.editing .preview-option-text:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Home Page Styles */
.home-hero {
    text-align: center;
    padding: 60px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 20px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

.hero-icon {
    font-size: 80px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.feature-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-color);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-icon i {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 48px;
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.quick-start {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 20px;
    margin-bottom: 50px;
    border: 2px solid var(--border-color);
}

.quick-start h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.quick-start h2 i {
    color: var(--primary-color);
}

.quick-start > p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.quick-start-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.about-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
}

.about-header i {
    font-size: 36px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.author-info {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

.author-details {
    flex: 1;
}

.author-details h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.author-title {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.author-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.author-stats {
    display: grid;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateX(5px);
    background: rgba(102, 126, 234, 0.15);
}

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

.stat-item span {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.home-footer {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(49, 130, 206, 0.1));
    border-radius: 12px;
    border-left: 4px solid var(--info-color);
}

.home-footer p {
    font-size: 15px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.home-footer i {
    color: var(--info-color);
    font-size: 18px;
}

/* Responsive for Home Page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-icon {
        font-size: 60px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quick-start h2 {
        font-size: 24px;
    }
    
    .quick-start-buttons {
        flex-direction: column;
    }
    
    .quick-start-buttons .btn {
        width: 100%;
    }
    
    .author-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-avatar {
        width: 100px;
        height: 100px;
        font-size: 50px;
    }
    
    .about-section {
        padding: 25px;
    }
    
    .about-header {
        justify-content: center;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.scroll-to-top i {
    animation: bounceUpDown 2s ease-in-out infinite;
}

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


/* User Avatar Image */
.user-avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user-avatar-small {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.user-avatar-small:hover .user-avatar-image {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header, .nav-tabs, .button-group, .quiz-controls, .scroll-to-top {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .question-card {
        page-break-inside: avoid;
    }
}