/* ========================= */
/* RESET & DASAR */
/* ========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================= */
/* LOADING SCREEN */
/* ========================= */

.loading {
    position: fixed;
    inset: 0;
    background: #1a365d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #48bb78;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: white;
    margin-top: 16px;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* ========================= */
/* NAVBAR */
/* ========================= */

.navbar {
    background: linear-gradient(135deg, #1a365d, #2b6cb0);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h2 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.logo-text span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    font-weight: 300;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-link {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-link.active {
    background: white;
    color: #2b6cb0;
}

/* ========================= */
/* PAGE */
/* ========================= */

.page {
    display: none;
    padding: 40px 0 60px;
    animation: fadeUp 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================= */
/* SECTION HEADER */
/* ========================= */

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header .badge {
    display: inline-block;
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a202c;
}

.section-header h2 span {
    color: #2b6cb0;
}

.section-header p {
    color: #4a5568;
    font-size: 1.05rem;
    max-width: 600px;
    margin: 8px auto 0;
}

/* ========================= */
/* HOME - HERO */
/* ========================= */

.hero {
    display: block;
    text-align: center;
    padding: 30px 0 50px;
}

.hero-content {
    max-width: 100%;
}

.hero-content .badge {
    display: inline-block;
    background: #ebf8ff;
    color: #2b6cb0;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a202c;
}

.hero-content h1 span {
    background: linear-gradient(135deg, #2b6cb0, #48bb78);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: #4a5568;
    font-size: 1.1rem;
    margin: 16px auto 24px;
    max-width: 600px;
}

.hero-button {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========================= */
/* HERO IMAGE - SEMBUNYIKAN */
/* ========================= */

.hero-image {
    display: none;
}

.physics-card {
    display: none;
}

/* ========================= */
/* BUTTON */
/* ========================= */

.btn {
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    color: white;
    box-shadow: 0 4px 14px rgba(43, 108, 176, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(43, 108, 176, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-3px);
}

/* ========================= */
/* HERO IMAGE */
/* ========================= */

.hero-image .physics-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.physics-card>div {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    color: #2b6cb0;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.physics-card>div:hover {
    background: #ebf8ff;
    transform: scale(1.05);
}

/* ========================= */
/* FEATURES */
/* ========================= */

.feature {
    padding: 30px 0;
}

.feature .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    padding: 28px 20px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.feature-card span {
    font-size: 2.8rem;
}

.feature-card h3 {
    color: #2b6cb0;
    margin: 12px 0 8px;
    font-size: 1.2rem;
}

.feature-card p {
    color: #4a5568;
    font-size: 0.9rem;
}

/* ========================= */
/* CARD GRID (Eksplor) */
/* ========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.menu-card {
    background: white;
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.menu-card:hover {
    border-color: #2b6cb0;
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.menu-card .card-icon {
    font-size: 3.5rem;
}

.menu-card h3 {
    color: #2b6cb0;
    margin: 12px 0 8px;
}

.menu-card p {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* ========================= */
/* LAB CONTENT */
/* ========================= */

#labContent {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 300px;
}

.lab-materi {
    background: #ebf8ff;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #2b6cb0;
    margin-bottom: 20px;
}

.lab-materi h3 {
    color: #2b6cb0;
    margin-bottom: 10px;
}

.lab-materi ul {
    padding-left: 20px;
    color: #2d3748;
}

.lab-materi ul li {
    margin-bottom: 4px;
}

.simulasi-wrapper {
    background: #f7fafc;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.simulasi-wrapper canvas {
    width: 100%;
    height: auto;
    background: #e8edf3;
    border-radius: 8px;
    display: block;
}

.simulasi-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    justify-content: center;
    align-items: center;
}

.simulasi-controls label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 6px;
}

.simulasi-controls input[type="range"] {
    width: 100px;
    accent-color: #2b6cb0;
}

.simulasi-controls .value {
    font-weight: bold;
    color: #2b6cb0;
    min-width: 28px;
}

.simulasi-data {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
}

.simulasi-data span {
    background: white;
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.simulasi-data strong {
    color: #2b6cb0;
}

/* ========================= */
/* BANK SOAL */
/* ========================= */

#quizContainer {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 200px;
}

.soal-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.soal-opsi {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.soal-opsi label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.soal-opsi label:hover {
    background: #edf2f7;
}

.soal-opsi label.selected {
    border-color: #2b6cb0;
    background: #ebf8ff;
}

.soal-opsi label.correct {
    border-color: #48bb78;
    background: #f0fff4;
}

.soal-opsi label.wrong {
    border-color: #fc8181;
    background: #fff5f5;
}

.soal-opsi input[type="radio"] {
    accent-color: #2b6cb0;
    width: 18px;
    height: 18px;
}

.quiz-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

#soalCounter {
    font-weight: 600;
    color: #2d3748;
}

/* ========================= */
/* TENTANG */
/* ========================= */

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.about-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.about-card h3 {
    color: #2b6cb0;
    margin-bottom: 12px;
}

.about-card p {
    color: #4a5568;
    line-height: 1.6;
}

.about-card ul {
    padding-left: 20px;
    color: #4a5568;
    line-height: 1.8;
}

/* ========================= */
/* FOOTER */
/* ========================= */

footer {
    background: #1a202c;
    color: #a0aec0;
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
}

footer p {
    font-size: 0.9rem;
}

/* ========================= */
/* BACK TO TOP */
/* ========================= */

.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2b6cb0;
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(43, 108, 176, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 100;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    transform: translateY(-3px);
    background: #2c5282;
}

/* ========================= */
/* RESPONSIF */
/* ========================= */

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        max-width: 100%;
    }

    .hero-button {
        justify-content: center;
    }

    .navbar .container {
        flex-direction: column;
    }

    .nav-menu {
        justify-content: center;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .logo-text h2 {
        font-size: 1.2rem;
    }

    .physics-card {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .nav-link {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 14px;
    }

    .physics-card {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
        padding: 16px;
    }

    .physics-card>div {
        padding: 12px;
        font-size: 0.8rem;
    }
}
.hero-content {
    text-align: center;
    max-width: 100%;
}