/* Global Styles */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #174ea6;
    --success-color: #0f9d58;
    --warning-color: #f4b400;
    --danger-color: #d93025;
    --light-bg: #f8f9fa;
    --dark-bg: #202124;
    --text-color: #202124;
    --text-light: #5f6368;
    --border-color: #dadce0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-light {
    background-color: white;
    color: var(--primary-color);
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-header {
    padding: 20px 25px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 25px;
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.hero-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Statistics Section */
.statistics-section {
    padding: 60px 0;
    background: white;
}

.stat-card {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    background: var(--light-bg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

.stat-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 3rem;
    opacity: 0.1;
    color: var(--primary-color);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Learning Flow */
.learning-flow-section {
    padding: 80px 0;
    background: white;
}

.flow-steps {
    margin-top: 40px;
}

.step {
    background: var(--light-bg);
    padding: 30px 20px;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 15px;
}

.step-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.step-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.step-desc {
    color: var(--text-light);
    font-size: 0.9rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Dashboard */
.dashboard-page {
    padding: 40px 0;
}

.dashboard-header {
    margin-bottom: 40px;
}

.user-level-badge {
    background: var(--light-bg);
    padding: 10px 20px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.user-level-badge .level {
    font-weight: 700;
    color: var(--primary-color);
}

.user-level-badge .xp {
    color: var(--text-light);
}

.stats-row {
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.progress-list .progress-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.progress-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.progress-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-item-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress {
    height: 8px;
    border-radius: 4px;
    flex: 1;
    margin-right: 15px;
}

.progress-bar {
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Achievement Grid */
.achievement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.achievement-item {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-light);
    position: relative;
    transition: var(--transition);
}

.achievement-item.earned {
    background: var(--primary-color);
    color: white;
}

.achievement-item.locked {
    opacity: 0.5;
    filter: grayscale(1);
}

.achievement-item .earned-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    padding: 2px 4px;
    font-size: 0.7rem;
}

/* Activity List */
.activity-list {
    list-style: none;
    padding: 0;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-list li i {
    font-size: 1.2rem;
}

/* Quiz */
.quiz-take-page {
    padding: 40px 0;
}

.quiz-header {
    text-align: center;
    margin-bottom: 40px;
}

.quiz-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    color: var(--text-light);
}

.quiz-meta i {
    margin-right: 5px;
}

.question-item {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.question-number {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.question-image {
    margin-bottom: 20px;
}

.question-image img {
    max-width: 100%;
    border-radius: 8px;
}

.question-options {
    display: grid;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.option:hover {
    border-color: var(--primary-color);
    background: var(--light-bg);
}

.option input[type="radio"] {
    display: none;
}

.option input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background: #e8f0fe;
}

.option label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

.option-letter {
    width: 30px;
    height: 30px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.option input[type="radio"]:checked + label .option-letter {
    background: var(--primary-color);
    color: white;
}

.quiz-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.question-counter {
    font-weight: 500;
    color: var(--text-light);
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.timer {
    font-weight: 500;
    color: var(--text-light);
}

/* Simulation */
.simulation-page {
    padding: 40px 0;
}

.scenario-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 20px;
}

.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.scenario-card.active {
    border: 3px solid var(--primary-color);
    background: #e8f0fe;
}

.scenario-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.scenario-card h4 {
    margin-bottom: 5px;
}

.scenario-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.simulation-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.simulation-header {
    padding: 20px 25px;
    background: var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.simulation-stats {
    display: flex;
    gap: 20px;
}

.simulation-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.simulation-area {
    position: relative;
    background: #e8f0fe;
    min-height: 500px;
}

#simulationCanvas {
    width: 100%;
    height: auto;
    background: #e8f0fe;
}

.simulation-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.simulation-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.simulation-info {
    flex: 1;
}

.simulation-info h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.simulation-info p {
    color: var(--text-light);
    margin: 0;
}

/* Results */
.results-card {
    text-align: center;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: white;
}

.results-card.passed {
    border-top: 4px solid var(--success-color);
}

.results-card.failed {
    border-top: 4px solid var(--danger-color);
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.results-card.passed .results-icon {
    color: var(--success-color);
}

.results-card.failed .results-icon {
    color: var(--danger-color);
}

.results-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid var(--primary-color);
}

.score-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.passing-score {
    color: var(--text-light);
    margin-top: 10px;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-light);
}

.stat-value {
    font-weight: 500;
}

.results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.certificate-earned {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 8px;
}

.certificate-earned i {
    color: var(--success-color);
    font-size: 2rem;
    margin-right: 10px;
}

/* News Section */
.news-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-body {
    padding: 20px;
}

.news-category {
    display: inline-block;
    padding: 2px 10px;
    background: var(--light-bg);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.news-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.news-body p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.news-meta i {
    margin-right: 5px;
}

/* CTA Section */
.cta-section {
    padding: 60px 0;
    background: var(--primary-color);
    color: white;
}

.cta-wrapper {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 12px;
}

.cta-section h2 {
    margin-bottom: 10px;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 0;
}

.cta-section .btn {
    background: white;
    color: var(--primary-color);
}

.cta-section .btn:hover {
    background: var(--light-bg);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 60px 0 30px;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 20px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-right: 0;
    }
    
    .step-arrow {
        transform: rotate(90deg);
        padding: 10px 0;
    }
    
    .quiz-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .simulation-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .simulation-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
    }
}