/* quizdetails.css - Modern Quiz Details Page */

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

:root {
    --primary: #5f9df3;
    --primary-dark: #3f7ad0;
    --primary-light: #8bb9ff;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --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;
}

@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: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

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

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

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray);
    font-size: 0.95rem;
}

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

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

.breadcrumb i {
    font-size: 0.8rem;
    color: var(--gray);
}

/* 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);
}

.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 Details Container */
.quiz-details-container {
    animation: fadeInUp 0.8s ease-out;
}

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

/* Quiz Card (for single quiz view) */
.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;
    max-width: 800px;
    margin: 0 auto 3rem;
    position: relative;
    overflow: hidden;
}

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

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s;
}

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

.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quiz-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary);
}

.quiz-header h2 {
    font-size: 2rem;
    flex: 1;
}

.quiz-badge {
    background: rgba(95, 157, 243, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary-light);
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Quiz Meta Info */
.quiz-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

.meta-item {
    text-align: center;
}

.meta-item i {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.meta-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.2rem;
}

.meta-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

/* Quiz Description */
.quiz-description {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 20px;
}

.quiz-description h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.quiz-description h3 i {
    color: var(--primary);
}

.quiz-description p {
    color: var(--gray);
    line-height: 1.8;
}

/* Tags */
.quiz-tags {
    margin-bottom: 2rem;
}

.quiz-tags h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.quiz-tags h3 i {
    color: var(--primary);
}

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

.tag {
    background: rgba(95, 157, 243, 0.15);
    border: 1px solid rgba(95, 157, 243, 0.3);
    color: var(--primary-light);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.tag:hover {
    background: rgba(95, 157, 243, 0.3);
    transform: translateY(-2px);
}

/* Quiz Actions */
.quiz-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary, .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;
    flex: 1;
    justify-content: center;
}

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

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

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

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

/* Multiple Quizzes Grid */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.quiz-grid-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.quiz-grid-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.quiz-grid-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.quiz-creator {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quiz-creator i {
    font-size: 0.8rem;
}

.quiz-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.quiz-stats i {
    color: var(--primary);
    margin-right: 3px;
}

.start-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

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

/* Message Styles */
.message-container {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message-container i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.message-container p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.message-container a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.message-container a:hover {
    text-decoration: underline;
}

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 2rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

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

/* Related Quizzes Section */
.related-quizzes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-quizzes h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.related-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.related-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
}

.related-badge.new {
    background: var(--gradient-3);
}

.related-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.related-card p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.related-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
}

.related-meta i {
    color: var(--primary);
    margin-right: 3px;
}

.btn-related {
    width: 100%;
    padding: 0.6rem;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.btn-related:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* 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;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 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;
    }
    
    .quiz-meta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .quiz-card {
        padding: 1.5rem;
    }
    
    .quiz-header {
        flex-direction: column;
        text-align: center;
    }
    
    .quiz-header h2 {
        font-size: 1.5rem;
    }
    
    .quizzes-grid {
        grid-template-columns: 1fr;
    }
}