/* Custom styles for QuizMaster */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Quiz Cards */
.quiz-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.quiz-card .card-body {
    padding: 1.5rem;
}

.quiz-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.quiz-meta {
    margin-top: 1rem;
}

.quiz-meta .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

/* Quiz Taking Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.question-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
}

.question-number {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.answer-option {
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option input[type="radio"] {
    display: none;
}

.answer-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.answer-option:hover .answer-content {
    border-color: #0d6efd;
    background: #f8f9ff;
}

.answer-option.selected .answer-content {
    border-color: #0d6efd;
    background: #e7f3ff;
}

.answer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #6c757d;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1rem;
}

.answer-option.selected .answer-letter {
    background: #0d6efd;
}

.answer-text {
    flex: 1;
    font-weight: 500;
}

/* Timer */
.timer {
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.timer.warning {
    background: var(--danger-color);
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Progress Bar */
.progress-container {
    background: var(--light-color);
    border-radius: 10px;
    padding: 0.5rem;
    margin-bottom: 2rem;
}

.progress {
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Results Page */
.result-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    background: conic-gradient(var(--success-color) 0deg, var(--success-color) var(--percentage), #e9ecef var(--percentage), #e9ecef 360deg);
}

.score-text {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.score-percentage {
    font-size: 1.2rem;
    color: var(--secondary-color);
}

/* Answer Review */
.answer-review {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.answer-review.correct {
    border-left-color: var(--success-color);
    background: #d4edda;
}

.answer-review.incorrect {
    border-left-color: var(--danger-color);
    background: #f8d7da;
}

/* Professional Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(13, 110, 253, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Admin Panel Styles */
.admin-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    min-height: 100vh;
}

.admin-sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.admin-sidebar .nav-link:hover {
    background: #e9ecef;
    color: #0d6efd;
}

.admin-sidebar .nav-link.active {
    background: #0d6efd;
    color: white;
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

.admin-content {
    padding: 2rem;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stats-card.primary {
    border-left: 4px solid #0d6efd;
}

.stats-card.success {
    border-left: 4px solid #198754;
}

.stats-card.warning {
    border-left: 4px solid #ffc107;
}

.stats-card.info {
    border-left: 4px solid #0dcaf0;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}

.stats-label {
    color: #6c757d;
    font-weight: 500;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Professional Button Styles */
.btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-outline-primary {
    border: 2px solid #0d6efd;
    color: #0d6efd;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #0d6efd;
    color: white;
    transform: translateY(-1px);
}

/* Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Ad Styles - Professional AdSense Integration */
.header-ads {
    margin-bottom: 1rem;
}

.ad-banner-header {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}

.ad-sidebar {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.ad-footer {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 1rem;
}

.ad-quiz-between {
    background: transparent;
    border: none;
    padding: 1rem 0;
    margin: 1rem 0;
}

.ad-content {
    background: transparent;
    border: none;
    padding: 0;
}

/* Responsive ad adjustments */
@media (max-width: 768px) {
    .header-ads {
        margin-bottom: 0.5rem;
    }
    
    .ad-sidebar {
        margin-bottom: 1rem;
    }
    
    .ad-quiz-between {
        padding: 0.5rem 0;
        margin: 0.5rem 0;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
} 