/* create.css - Modern Create Quiz Page */

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

:root {
    --primary: #5f9df3;
    --primary-dark: #3f7ad0;
    --primary-light: #8bb9ff;
    --secondary: #8b5cf6;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fed7aa;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --dark: #0b0f17;
    --dark-light: #1a1f2e;
    --gray: #9ca3af;
    --light: #f3f4f6;
    --gradient-1: linear-gradient(135deg, #5f9df3, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-3: linear-gradient(135deg, #10b981, #059669);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(95, 157, 243, 0.3);
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at 10% 30%, #1e2b3f, #0b0f17);
    color: #eef5ff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Background Elements */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(95, 157, 243, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95, 157, 243, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(95, 157, 243, 0.05);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-duration: 25s;
}

.shape2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -50px;
    background: rgba(139, 92, 246, 0.05);
    animation-duration: 30s;
}

.shape3 {
    width: 250px;
    height: 250px;
    top: 50%;
    left: 80%;
    background: rgba(16, 185, 129, 0.05);
    animation-duration: 22s;
}

.shape4 {
    width: 350px;
    height: 350px;
    top: 70%;
    left: 10%;
    background: rgba(245, 158, 11, 0.05);
    animation-duration: 28s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.1); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}

/* Navbar */
.head {
    padding: 1rem 2rem;
    background: rgba(10, 20, 35, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(95, 157, 243, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.left {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.left i {
    color: var(--primary);
    background: rgba(95, 157, 243, 0.2);
    padding: 8px;
    border-radius: 12px;
}

.right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.right a {
    color: #cddfff;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 30px;
    transition: all 0.3s;
}

.right a:hover {
    background: rgba(95, 157, 243, 0.15);
    color: white;
}

.right a.active {
    background: rgba(95, 157, 243, 0.2);
    color: white;
}

.auth-btn {
    background: var(--gradient-1);
    color: white !important;
    padding: 0.6rem 1.8rem !important;
    box-shadow: 0 4px 15px rgba(95, 157, 243, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 157, 243, 0.5);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    animation: slideDown 0.8s ease-out;
}

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

.header-content {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
}

.header-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    border-color: var(--primary);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(95, 157, 243, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s infinite linear;
}

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

/* Quiz Section */
.quiz-section {
    animation: fadeInUp 0.8s ease-out;
}

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

.quiz-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.quiz-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* Form Styles */
.quiz-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--primary-light);
}

.form-group label i {
    color: var(--primary);
}

.form-input, .form-select, .form-textarea {
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(95, 157, 243, 0.1);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--gray);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f9df3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

.form-select option {
    background: var(--dark-light);
    color: white;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Questions Section */
.questions-section {
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
}

.section-header h3 i {
    color: var(--primary);
}

.question-stats .stat-badge {
    background: rgba(95, 157, 243, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Question Block */
.question-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

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

.question-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 20px 0 0 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.question-number {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-light);
}

.question-number i {
    color: var(--primary);
}

.remove-question {
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-question:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

/* Question Inputs */
.question-field {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.question-field:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.question-field::placeholder {
    color: var(--gray);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-input {
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    padding-left: 2.5rem;
}

.option-input:focus {
    outline: none;
    border-color: var(--primary);
}

.option-input::placeholder {
    color: var(--gray);
}

.option-label {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--primary);
    pointer-events: none;
}

.option-wrapper {
    position: relative;
}

.correct-answer {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.correct-answer label {
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.correct-answer input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
}

.correct-answer input:focus {
    outline: none;
    border-color: var(--success);
}

/* Add Question Button */
.btn-add-question {
    width: 100%;
    padding: 1rem;
    background: rgba(95, 157, 243, 0.1);
    border: 2px dashed rgba(95, 157, 243, 0.3);
    border-radius: 16px;
    color: var(--primary-light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.btn-add-question:hover {
    background: rgba(95, 157, 243, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-add-question i {
    font-size: 1.2rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel, .btn-save {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
}

.btn-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-cancel:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
}

.btn-save {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(95, 157, 243, 0.4);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(95, 157, 243, 0.6);
}

/* Preview Section */
.preview-section {
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-icon:hover {
    color: white;
}

.preview-content {
    padding: 1.5rem;
}

.preview-question {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.preview-question h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.preview-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.preview-option {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.preview-answer {
    color: var(--success);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Footer */
.foot {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h3 i {
    color: var(--primary);
}

.footer-section p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.contact-info li {
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .header-content h1 {
        font-size: 2.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .right {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(10, 20, 35, 0.95);
        backdrop-filter: blur(14px);
        padding: 2rem;
        flex-direction: column;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }
    
    .right.show {
        display: flex;
    }
    
    .right a {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .quiz-card {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-save {
        width: 100%;
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .correct-answer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .correct-answer input {
        width: 100%;
    }
}