/* Core variables and base styles */
:root {
    --primary: #3b82f6;
    --secondary: #10b981;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #06b6d4;
    --background: #f8fafc;
    --text: #1e293b;
}
body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    position: relative;
}
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}
.subtitle {
    font-size: 1.2rem;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 20px;
}
/* Theme toggle switch */
.theme-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: #f8fafc;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}
.theme-switch:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.theme-switch .switch-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 22px;
    transition: all 0.3s ease;
}
.theme-switch .switch-label {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    transition: color 0.3s;
}
/* Topic grid and cards */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.topic-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}
.topic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.topic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}
.topic-card:hover::before {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.topic-icon {
    font-size: 48px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}
/* Topic-specific colors */
.topic-card.linux .topic-icon {
    color: #F6A800;
}
.topic-card.python .topic-icon {
    color: #3776AB;
}
.topic-card.aws .topic-icon {
    color: #FF9900;
}
.topic-card.docker .topic-icon {
    color: #0db7ed;
}
.topic-card.kubernetes .topic-icon {
    color: #326CE5;
}
.topic-card.cicd .topic-icon {
    color: #18BE77;
}
.topic-card.git .topic-icon {
    color: #F05032;
}
.topic-card.terraform .topic-icon {
    color: #7B42BC;
}
.topic-card.network .topic-icon {
    color: #00A0E1;
}
.topic-card.cloud .topic-icon {
    color: #3EACFA;
}
.topic-card.mixed .topic-icon {
    color: #8B5CF6;
}
.topic-card:hover .topic-icon {
    transform: scale(1.1) rotate(5deg);
}
.topic-name {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}
/* Topic-specific hover effects */
.topic-card.linux:hover .topic-name {
    color: #F6A800;
}
.topic-card.python:hover .topic-name {
    color: #3776AB;
}
.topic-card.aws:hover .topic-name {
    color: #FF9900;
}
.topic-card.docker:hover .topic-name {
    color: #0db7ed;
}
.topic-card.kubernetes:hover .topic-name {
    color: #326CE5;
}
.topic-card.cicd:hover .topic-name {
    color: #18BE77;
}
.topic-card.git:hover .topic-name {
    color: #F05032;
}
.topic-card.terraform:hover .topic-name {
    color: #7B42BC;
}
.topic-card.network:hover .topic-name {
    color: #00A0E1;
}
.topic-card.cloud:hover .topic-name {
    color: #3EACFA;
}
.topic-card.mixed:hover .topic-name {
    color: #8B5CF6;
}
/* Dark mode topic card enhancements */
.dark-mode .topic-card {
    background: #1e293b;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.dark-mode .topic-card:hover::before {
    border-color: #60a5fa;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
}
.dark-mode .topic-desc {
    color: #94a3b8;
}
/* Keep the original topic colors in dark mode but slightly adjust for better visibility */
.dark-mode .topic-card.linux .topic-icon {
    color: #FBBF24;
}
.dark-mode .topic-card.python .topic-icon {
    color: #60A5FA;
}
.dark-mode .topic-card.aws .topic-icon {
    color: #FCD34D;
}
.dark-mode .topic-card.docker .topic-icon {
    color: #67E8F9;
}
.dark-mode .topic-card.kubernetes .topic-icon {
    color: #93C5FD;
}
.dark-mode .topic-card.cicd .topic-icon {
    color: #34D399;
}
.dark-mode .topic-card.git .topic-icon {
    color: #FB7185;
}
.dark-mode .topic-card.terraform .topic-icon {
    color: #C4B5FD;
}
.dark-mode .topic-card.network .topic-icon {
    color: #67E8F9;
}
.dark-mode .topic-card.cloud .topic-icon {
    color: #93C5FD;
}
.dark-mode .topic-card.mixed .topic-icon {
    color: #A78BFA;
}
.topic-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.5;
}
/* Quiz UI */
.start-screen, .quiz-screen, .result-screen, .loading-screen, .review-screen {
    display: none;
}
.active {
    display: block;
}
.start-screen {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}
.start-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}
.start-desc {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.btn {
    background: var(--primary);
    color: #fff !important;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}
.btn-secondary {
    background: #64748b;
    color: #fff !important;
}
.btn-secondary:hover {
    background: #475569;
}
.quiz-screen {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 35px;
}
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}
.quiz-title {
    font-size: 1.6rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}
.quiz-title i {
    font-size: 1.8rem;
}
.quiz-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
}
.progress-bar {
    width: 200px;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #60a5fa);
    width: 0%;
    transition: width 0.3s ease;
}
.question-container {
    margin-bottom: 25px;
}
.question-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 500;
}
.options-container {
    display: grid;
    gap: 12px;
}
.option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
}
.option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(4px);
}
.option.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary);
}
.option.correct {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}
.option.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}
.option-text {
    padding-left: 35px;
}
.option-marker {
    position: absolute;
    left: 15px;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.option.selected .option-marker {
    border-color: var(--primary);
    background: var(--primary);
}
.option.selected .option-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}
.quiz-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}
.result-screen {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
}
.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.result-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.result-score {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.result-message {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}
.result-details {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.detail-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.result-screen.excellent .detail-item {
    background: rgba(34, 197, 94, 0.1);
}
.result-screen.good .detail-item {
    background: rgba(59, 130, 246, 0.1);
}
.result-screen.average .detail-item {
    background: rgba(245, 158, 11, 0.1);
}
.result-screen.poor .detail-item {
    background: rgba(239, 68, 68, 0.1);
}
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}
.loading-screen {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.loading-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.review-screen {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 40px;
    text-align: left;
}
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.review-list {
    margin-top: 20px;
}
.review-item {
    background: #f8fafc;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
}
/* Responsive */
@media (max-width: 768px) {
    .topic-grid {
        grid-template-columns: 1fr 1fr;
    }
    .quiz-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .progress-bar {
        width: 100%;
    }
    .result-details {
        grid-template-columns: 1fr;
    }
    .quiz-footer, .result-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn {
        width: 100%;
    }
}
@media (max-width: 480px) {
    .topic-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2rem;
    }
    .quiz-screen, .result-screen {
        padding: 20px;
    }
}
/* Dark mode overrides */
.dark-mode {
    background-color: #0f172a;
}
.dark-mode body {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
.dark-mode h1, .dark-mode h2, .dark-mode h3, .dark-mode h4, .dark-mode h5, .dark-mode h6,
.dark-mode .subtitle, .dark-mode .start-title, .dark-mode .quiz-title, .dark-mode .result-title, .dark-mode .result-score, .dark-mode .result-message, .dark-mode .detail-label, .dark-mode .detail-value, .dark-mode .topic-name, .dark-mode .topic-desc, .dark-mode .question-text, .dark-mode .option-text, .dark-mode .review-header, .dark-mode .review-item {
    color: #f8fafc !important;
}
.dark-mode .btn, .dark-mode .btn-secondary {
    color: #fff !important;
}
.dark-mode .quiz-screen, .dark-mode .result-screen, .dark-mode .start-screen, .dark-mode .loading-screen, .dark-mode .review-screen {
    background: #1e293b;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.dark-mode .option {
    background: #1e293b;
    border-color: #334155;
}
.dark-mode .option:hover {
    background: #273449;
    border-color: #475569;
}
.dark-mode .progress-bar {
    background: #334155;
}
.dark-mode .progress-fill {
    background: #60a5fa !important;
}
.dark-mode .detail-item {
    background: rgba(255, 255, 255, 0.05);
}
.dark-mode .theme-switch {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.dark-mode .theme-switch .switch-label {
    color: #f8fafc !important;
}
.dark-mode .theme-switch .switch-icon {
    color: #60a5fa;
}
.dark-mode .topic-card {
    background: #1e293b;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.dark-mode .topic-name {
    color: #60a5fa;
}
.dark-mode .topic-desc {
    color: #94a3b8;
}
/* Result states */
.result-screen.excellent {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 2px solid #22c55e;
}
.result-screen.good {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 2px solid #3b82f6;
}
.result-screen.average {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
}
.result-screen.poor {
    background: linear-gradient(135deg, #ffffff 0%, #fee2e2 100%);
    border: 2px solid #ef4444;
}
.result-screen.excellent .result-icon {
    color: #22c55e;
    animation: bounce 1s ease;
}
.result-screen.good .result-icon {
    color: #3b82f6;
    animation: float 2s ease-in-out infinite;
}
.result-screen.average .result-icon {
    color: #f59e0b;
    animation: wobble 1s ease;
}
.result-screen.poor .result-icon {
    color: #ef4444;
    animation: shake 0.5s ease;
}
.result-screen.excellent .result-title {
    color: #22c55e;
}
.result-screen.good .result-title {
    color: #3b82f6;
}
.result-screen.average .result-title {
    color: #f59e0b;
}
.result-screen.poor .result-title {
    color: #ef4444;
}
.result-screen.excellent .result-score {
    color: #22c55e;
    text-shadow: 0 2px 10px rgba(34, 197, 94, 0.2);
}
.result-screen.good .result-score {
    color: #3b82f6;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}
.result-screen.average .result-score {
    color: #f59e0b;
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}
.result-screen.poor .result-score {
    color: #ef4444;
    text-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}
.result-screen.excellent .result-message {
    color: #166534;
}
.result-screen.good .result-message {
    color: #1e40af;
}
.result-screen.average .result-message {
    color: #92400e;
}
.result-screen.poor .result-message {
    color: #991b1b;
}
.result-screen.excellent .detail-item {
    background: rgba(34, 197, 94, 0.15);
}
.result-screen.good .detail-item {
    background: rgba(59, 130, 246, 0.15);
}
.result-screen.average .detail-item {
    background: rgba(245, 158, 11, 0.15);
}
.result-screen.poor .detail-item {
    background: rgba(239, 68, 68, 0.15);
}
/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}
@keyframes float {
    0%, 100% {transform: translateY(0);}
    50% {transform: translateY(-10px);}
}
@keyframes wobble {
    0%, 100% {transform: rotate(0);}
    25% {transform: rotate(-5deg);}
    75% {transform: rotate(5deg);}
}
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    25% {transform: translateX(-5px);}
    75% {transform: translateX(5px);}
}
/* Dark mode adjustments */
.dark-mode .result-screen {
    background: #1e293b;
}
.dark-mode .result-screen.excellent {
    background: linear-gradient(135deg, #1e293b 0%, #064e3b 100%);
}
.dark-mode .result-screen.good {
    background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%);
}
.dark-mode .result-screen.average {
    background: linear-gradient(135deg, #1e293b 0%, #78350f 100%);
}
.dark-mode .result-screen.poor {
    background: linear-gradient(135deg, #1e293b 0%, #7f1d1d 100%);
}
.dark-mode .detail-item {
    background: rgba(255, 255, 255, 0.05);
}
.dark-mode .result-screen.excellent .detail-item {
    background: rgba(34, 197, 94, 0.15);
}
.dark-mode .result-screen.good .detail-item {
    background: rgba(59, 130, 246, 0.15);
}
.dark-mode .result-screen.average .detail-item {
    background: rgba(245, 158, 11, 0.15);
}
.dark-mode .result-screen.poor .detail-item {
    background: rgba(239, 68, 68, 0.15);
} 