/* selectquiz.css - Modern Quiz Selection 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;
}

.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: 1400px;
    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;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
    flex: 2;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1rem;
    pointer-events: none;
}

#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(95, 157, 243, 0.1);
}

#searchInput::placeholder {
    color: var(--gray);
}

/* Filter Dropdown */
.filter-dropdown {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.filter-dropdown select {
    width: 100%;
    padding: 1rem 2rem 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-dropdown select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.filter-dropdown i {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    pointer-events: none;
}

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

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

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

/* Quiz Grid */
.quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    padding: 0.5rem;
}

/* Quiz Card */
.quiz-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 1.8rem;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.quiz-card:hover {
    transform: translateY(-8px) scale(1.02);
    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.4s;
    transform-origin: left;
}

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

/* Quiz Badge */
.quiz-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.quiz-badge.popular {
    background: var(--gradient-2);
    color: white;
}

.quiz-badge.new {
    background: var(--gradient-3);
    color: white;
}

.quiz-badge.trending {
    background: var(--gradient-1);
    color: white;
}

/* Quiz Header */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.quiz-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 8px 16px -4px var(--primary);
}

.quiz-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
}

/* Quiz Creator */
.quiz-creator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.quiz-creator i {
    color: var(--primary);
    font-size: 0.9rem;
}

.creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

/* Quiz Description */
.quiz-description {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.6;
    flex: 1;
}

/* Quiz Meta */
.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--gray);
}

.meta-item i {
    color: var(--primary);
    font-size: 0.9rem;
}

.meta-item.highlight {
    color: var(--primary-light);
}

/* Quiz Tags */
.quiz-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

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

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

/* Quiz Footer */
.quiz-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.quiz-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--warning);
    font-size: 0.9rem;
}

.quiz-rating span {
    color: var(--gray);
    margin-left: 3px;
}

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

.start-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(95, 157, 243, 0.4);
}

.start-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.start-btn:hover i {
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray);
    margin-bottom: 2rem;
}

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

.create-quiz-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

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

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

.message-container p {
    color: var(--gray);
    font-size: 1.1rem;
}

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

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

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

@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;
    }
    
    .search-box, .filter-dropdown {
        width: 100%;
    }
    
    .quizzes-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .quiz-card {
        padding: 1.5rem;
    }
}