/* 
=========================================
   CTET MASTER - MODERN CSS STYLESHEET
   Google Fonts: Inter, Outfit
========================================= 
*/

:root {
    --primary: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981; /* Emerald */
    --accent: #F59E0B; /* Amber */
    --danger: #EF4444; /* Red */
    --dark: #1F2937;
    --gray: #6B7280;
    --light-gray: #F3F4F6;
    --light: #F9FAFB;
    --white: #FFFFFF;
    
    --success-bg: #D1FAE5;
    --danger-bg: #FEE2E2;
    --warning-bg: #FEF3C7;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand, .card-title, .section-title {
    font-family: 'Outfit', sans-serif;
    color: var(--dark);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--gray); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-warning { color: var(--accent); }

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
.pb-4 { padding-bottom: 1.5rem; }
.border-bottom { border-bottom: 1px solid var(--light-gray); }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.d-block { display: block; }
.small { font-size: 0.875rem; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.2; font-weight: 700; }
h2 { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 700; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-hover); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white);}
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-outline-primary { border: 1px solid var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; }
.btn-success { background: var(--secondary); color: var(--white); }
.btn-success:hover { background: #059669; }
.btn-large { padding: 0.8rem 2rem; font-size: 1.1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; }
.btn-block { display: block; width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; border: 1px solid var(--gray); background: var(--light-gray); color: var(--gray); }

.shadow-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* Animations */
.slide-up { animation: slideUp 0.4s ease forwards; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-header { padding: 1.5rem; background: var(--white); }
.card-body { padding: 1.5rem; }

/* Badges */
.badge { padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; display: inline-block; }
.badge-primary { background: var(--primary); color: var(--white); }
.badge-outline { border: 1px solid var(--gray); color: var(--gray); }

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.nav-links { display: flex; gap: 2rem; align-items: center; font-weight: 500; }
.nav-links a:not(.btn) { color: var(--dark); }
.nav-links a:not(.btn):hover { color: var(--primary); }

.user-menu { display: flex; align-items: center; gap: 1.5rem; }
.user-profile { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.profile-pic { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; }

/* Landing Page Hero */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    overflow: hidden;
}
.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.hero-text { flex: 1; }
.hero-text h1 { margin-bottom: 1.5rem; background: linear-gradient(to right, var(--dark), var(--primary)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { font-size: 1.2rem; color: var(--gray); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; }
.hero-image { flex: 1; position: relative; height: 400px; display: flex; justify-content: center; align-items: center;}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex; gap: 0.8rem; align-items: center;
    border: 1px solid rgba(255,255,255,0.5);
    animation: float 6s ease-in-out infinite;
}
.floating-card i { color: var(--primary); font-size: 1.5rem; }
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.c1 { top: 10%; left: 10%; animation-delay: 0s; }
.c2 { top: 50%; right: 10%; animation-delay: 1s; }
.c3 { bottom: 10%; left: 30%; animation-delay: 2s; }

/* Landing Page Features */
.features-section { padding: 5rem 0; background: var(--white); text-align: center; }
.features-section .section-title { margin-bottom: 3rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { padding: 2rem; background: var(--light); border-radius: var(--radius-lg); transition: var(--transition); border: 1px solid var(--light-gray); }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); background: var(--white); }
.icon-circle { width: 70px; height: 70px; border-radius: 50%; background: #EEF2FF; color: var(--primary); display: flex; justify-content: center; align-items: center; font-size: 2rem; margin: 0 auto 1.5rem; }
.feature-card h3 { margin-bottom: 1rem; }
.feature-card p { color: var(--gray); text-align: justify;}

.placeholder-section { padding: 5rem 0; }
.placeholder-section h2 { margin-bottom: 1.5rem; }
.placeholder-section p { margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; color: var(--gray); }

/* Auth Container */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #EEF2FF 0%, #C7D2FE 100%); }
.auth-container {
    width: 100%; max-width: 450px; padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.auth-header { margin-bottom: 2rem; }
.auth-header h2 { font-size: 2rem; color: var(--dark); }
.auth-header p { color: var(--gray); }

.alert { padding: 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; font-weight: 500; font-size: 0.9rem;}
.alert-danger { background: var(--danger-bg); color: #B91C1C; border-left: 4px solid var(--danger); }
.alert-success { background: var(--success-bg); color: #047857; border-left: 4px solid var(--secondary); }
.alert-info { background: #DBEAFE; color: #1D4ED8; border-left: 4px solid #3B82F6;}

.btn-google { background: var(--white); color: var(--dark); border: 1px solid var(--light-gray); display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.btn-google:hover { background: var(--light-gray); box-shadow: var(--shadow-sm); }
.btn-google i { color: #DB4437; font-size: 1.2rem; }

.btn-facebook { background: #1877F2; color: var(--white); display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.btn-github { background: #333; color: var(--white); display: flex; justify-content: center; align-items: center; gap: 0.5rem; }

.divider { display: flex; align-items: center; text-align: center; margin: 1.5rem 0; color: var(--gray); font-size: 0.9rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #E5E7EB; }
.divider span { padding: 0 10px; }

.auth-footer p { font-size: 0.8rem; color: var(--gray); }
.back-link { display: inline-block; margin-top: 1rem; font-size: 0.9rem; color: var(--gray); }
.back-link:hover { color: var(--primary); }
.form-control { width: 100%; border: 1px solid #D1D5DB; border-radius: var(--radius-md); font-family: 'Inter', sans-serif;}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; }
.welcome-card { background: linear-gradient(135deg, var(--white) 0%, #EEF2FF 100%); height: 100%; border: 2px dashed #C7D2FE;}
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat-box { background: var(--light); padding: 1.5rem; border-radius: var(--radius-md); border: 1px solid var(--light-gray); }
.stat-label { color: var(--gray); font-size: 0.9rem; font-weight: 500; }
.stat-value { font-size: 1.8rem; font-weight: 700; font-family: 'Outfit'; margin-top: 0.5rem; }

.activity-list { list-style: none; }
.activity-list li { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--light-gray); }
.activity-list li:last-child { border-bottom: none; }
.activity-details h4 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.activity-details p { color: var(--gray); font-size: 0.85rem; }

/* Quiz UI */
.quiz-card { border-top: 5px solid var(--primary); }
.question-block { animation: slideUp 0.3s ease; }
.question-text { font-size: 1.3rem; margin-bottom: 2rem; color: #111827; line-height: 1.5; font-weight: 600;}

.options-container { display: flex; flex-direction: column; gap: 1rem; }
.option-label { position: relative; cursor: pointer; }
.option-label input[type="radio"] { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.option-content { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--light); border: 2px solid var(--light-gray); border-radius: var(--radius-md); transition: var(--transition); }
.option-letter { width: 35px; height: 35px; background: var(--white); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 700; color: var(--gray); border: 1px solid #D1D5DB; }
.option-text { font-size: 1.1rem; }

.option-label input[type="radio"]:checked ~ .option-content { border-color: var(--primary); background: #EEF2FF; }
.option-label input[type="radio"]:checked ~ .option-content .option-letter { background: var(--primary); color: var(--white); border-color: var(--primary); }
.option-label:hover .option-content { border-color: #A5B4FC; }

.timer { background: var(--primary); color: white; padding: 0.5rem 1rem; border-radius: var(--radius-full); font-weight: 700; font-family: 'Outfit'; letter-spacing: 1px; }

/* Palette */
.palette-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.palette-btn { width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--light-gray); background: var(--white); font-weight: 600; cursor: pointer; transition: all 0.2s; }
.palette-btn:hover { background: var(--light-gray); }
.palette-btn.current { border: 2px solid var(--primary); background: #EEF2FF; color: var(--primary); }
.palette-btn.attempted { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.palette-btn.unattempted { background: var(--white); color: var(--dark); border-color: #D1D5DB;}

.legend-item { display: inline-flex; align-items: center; gap: 0.3rem; margin-right: 1rem; }
.legend-box { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-box.current { border: 2px solid var(--primary); background: #EEF2FF; }
.legend-box.attempted { background: var(--secondary); }
.legend-box.unattempted { background: var(--white); border: 1px solid #D1D5DB; }

.quiz-nav { padding-top: 1.5rem; border-top: 1px solid var(--light-gray); }

/* Result Page */
.score-circle-container { display: flex; justify-content: center; }
.score-circle { width: 180px; height: 180px; border-radius: 50%; background: conic-gradient(var(--primary) calc(100%), var(--light-gray) 0); display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: var(--shadow-md); border: 8px solid #EEF2FF; }
.score-number { font-size: 3.5rem; font-weight: 700; font-family: 'Outfit'; color: var(--primary); line-height: 1; }
.score-total { font-size: 1rem; color: var(--gray); margin-top: 0.5rem; }

.stat-item { padding: 1.5rem; background: var(--light); border-radius: var(--radius-lg); flex: 1; margin: 0 0.5rem; border: 1px solid var(--light-gray); }
.stat-item h4 { font-size: 1.8rem; margin: 0.5rem 0 0.2rem; }
.stat-item.correct i, .stat-item.correct h4 { color: var(--secondary); }
.stat-item.incorrect i, .stat-item.incorrect h4 { color: var(--danger); }
.stat-item.unattempted i, .stat-item.unattempted h4 { color: var(--gray); }
.stat-item.accuracy i, .stat-item.accuracy h4 { color: var(--primary); }

/* Performance Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 1rem; background: var(--light-gray); font-weight: 600; color: var(--dark); }
.table td { padding: 1rem; border-bottom: 1px solid var(--light-gray); vertical-align: middle; }
.table tr:hover td { background: var(--light); }
.progress-bar-container { width: 100%; height: 6px; background: var(--light-gray); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 0.3rem;}
.progress-bar { height: 100%; border-radius: var(--radius-full); }

/* Footer */
footer { padding: 2rem 0; background: var(--dark); color: var(--white); margin-top: auto; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-image { display: none; }
    .result-stats { flex-direction: column; gap: 1rem; }
    .stat-item { margin: 0; }
    .stats-grid { grid-template-columns: 1fr; }
}
