/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out;
}

html {
    scroll-behavior: smooth;
}

body {
    scrollbar-width: none;
    overflow-y: scroll;
    text-decoration: none;
    text-align: left;
    line-height: 1.6;
    background-color: #f7f7f7;
    color: #333;
    animation: grow 5s;
}

body::-webkit-scrollbar {
    display: none;
}

header {
    box-shadow: 0px 5px 50px rgba(0, 0, 0, 0.54);
    border-radius: 0 0 20px 20px;
    background: linear-gradient(blue, #121212);
    padding: 200px;
    text-align: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar.scrolled {
    color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.425);
}

.navbar a {
    color: black;
    float: left;
    padding: 12px 15px;
    text-decoration: none;
}

.dropdown {
    font-weight: 600;
    float: right;
    overflow: hidden;
}

.dropdown .dropbtn {
    cursor: pointer;
    font-size: 16px;
    border-radius: 20px;
    color: white;
    padding: 6px 12px;
    background-color: inherit;
    font-family: inherit;
}

.dropdown:hover .dropbtn,
.dropbtn:focus {
    background: rgb(55, 55, 55);
    color: #ffbb00;
}

.dropdown-content {
    border-radius: 10px;
    display: none;
    top: 50px;
    left: -330px;
    position: absolute;
    background-color: #333333;
    min-width: 400px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.631);
    z-index: 3;
    animation: drop 0.5s ease;
    transition: ease-in-out 0.3s;
}

.dropdown-content a {
    float: none;
    gap: 0.5em;
    color: rgb(226, 226, 226);
    padding: 12px 16px;
    margin: 5px 60px;
    text-decoration: none;
    display: block;
    text-align: center;
    animation: alternate 0.5s ease;
}

.dropdown-content a:hover {
    font-weight: 1000;
    font-size: 18px;
    background-color: #ddd;
    color: #000;
    border-radius: 10px;
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

.show {
    display: block;
}

@keyframes alternate {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.belanda {
    background: url(img/londow.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.tanam {
    background: url(img/inggris.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.jep {
    background: url(img/jepon.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pro {
    background: url(img/pro.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.indo {
    background: url(img/indo.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image {
    width: 60%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
}

header h1 {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 400%;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
}

body,
main {
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

main {
    display: flex;
    flex-direction: column;
    align-items: justify;
    padding: 20px;
    max-width: 900px;
    min-height: 100vh;
    margin: auto;
}

h2 {
    margin-top: 5%;
}

ul {
    margin: 2px 0;
    padding: 20px;
}

blockquote {
    background: #f8f9fa;
    padding: 20px;
    border-left: 5px solid #0077b6;
    margin-bottom: 30px;
}

blockquote a {
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 1.2em;
}

.fun-fact {
    background-color: #fff3cd;
    color: #856404;
    border-left: 6px solid #ffeeba;
    padding: 15px 20px;
    margin: 30px 0;
    border-radius: 8px;
    font-style: italic;
    animation: fadeIn 1s ease-in-out;
}

.sejarah-img {
    width: 40%;
    max-width: 600px;
    margin: 20px auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.quiz-section {
    color: #333;
    background: #f0f8ff;
    padding: 30px;
    margin-top: 40px;
    border-radius: 10px;
}

.quiz-card {
    margin-bottom: 25px;
}

.quiz-card button {
    display: block;
    margin: 5px 0;
    text-align: left;
    padding: 10px 15px;
    border: none;
    background-color: #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.quiz-card button:hover {
    background-color: #ccc;
}

.timeline-section {
    margin-top: 60px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 12px;
}

.timeline-vertical {
    position: relative;
    padding-left: 25px;
    border-left: 3px solid #0077b6;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item:nth-child(even) {
    margin-right: 20px;
}

.timeline-item:nth-child(odd) {
    margin-left: 20px;
}

.timeline-dot {
    position: absolute;
    top: 5px;
    left: -10px;
    width: 18px;
    height: 18px;
    background-color: #0077b6;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #0077b6;
    z-index: 2;
}

.timeline-year {
    font-weight: bold;
    color: #0077b6;
    font-size: 18px;
    margin-bottom: 6px;
    display: inline-block;
}

.timeline-content p {
    margin: 0;
    padding-left: 5px;
    color: #333;
}

.timeline-content {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 4px 5px 10px rgba(0, 0, 0, 0.117);
}

.timeline-content:hover {
    box-shadow: 4px 5px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
    transition: all 0.3s ease-in-out;
    z-index: 1;
}

.animate {
    animation-duration: 0.75s;
    animation-delay: 0.5s;
    animation-name: animate-fade;
    animation-timing-function: cubic-bezier(0.26, 0.53, 0.74, 1.48);
    animation-fill-mode: backwards;
}

/* Pop In */
.animate.pop {
    animation-name: animate-pop;
}

@keyframes animate-pop {
    0% {
        opacity: 0;
        transform: scale(0.5, 0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1, 1);
    }
}

/* Animation Delays */
.delay-1 {
    animation-delay: 0.6s;
}
.delay-2 {
    animation-delay: 0.7s;
}
.delay-3 {
    animation-delay: 0.8s;
}
.delay-4 {
    animation-delay: 0.9s;
}
.delay-5 {
    animation-delay: 1s;
}
.delay-6 {
    animation-delay: 1.1s;
}
.delay-7 {
    animation-delay: 1.2s;
}
.delay-8 {
    animation-delay: 1.3s;
}
.delay-9 {
    animation-delay: 1.4s;
}
.delay-10 {
    animation-delay: 1.5s;
}
.delay-11 {
    animation-delay: 1.6s;
}
.delay-12 {
    animation-delay: 1.7s;
}
.delay-13 {
    animation-delay: 1.8s;
}
.delay-14 {
    animation-delay: 1.9s;
}
.delay-15 {
    animation-delay: 2s;
}

@media screen and (prefers-reduced-motion: reduce) {
    .animate {
        animation: none !important;
    }
}

.animate.pop {
    border: solid rgba(0, 0, 0, 0.239);
    background: #f7f7f7;
    color: #000000;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.136);
    margin: 20px 0;
    width: 100%;
    cursor: pointer;
    /* transition: transform 0.3s; */
}

.animate.pop:hover {
    box-shadow: 15px 15px 10px rgba(0, 0, 0, 0.522);
    border: solid #00000065;
    border-radius: 30px;
    transform: translateY(-6px) scale(1.035);
    transition: ease-in-out 0.3s;
}

.animate h2 {
    color: #000000;
    margin-bottom: 10px;
    text-shadow: 0 0 1px #000;
    font-weight: 800;
}

.animate a {
    text-decoration: none;
    color: #000000;
    font-weight: 700;
}

/* Footer */
footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px;
}

.footer-container div {
    max-width: 400px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin: 5px 0;
}

.footer-social a {
    min-height: 200px;
    margin-top: 50px;
    font-size: 25px;
    justify-content: space-between;
    padding: 5px;
}

.footer-links a,
.footer-social a {
    color: #ffd700;
    text-decoration: none;
}

.footer-social i {
    filter: grayscale(100%);
}

.social1 i:hover {
    color: magenta;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.social2 i:hover {
    color: white;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.social3 i:hover {
    color: blue;
    filter: grayscale(0%);
    transition: all 0.1s ease-in-out;
    transform: scale(1.5);
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: #111;
    padding: 15px 10px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #444;
}

.awal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #121212;
    padding: 4px 10px;
    height: 70px;
    width: 100%;
}

.logo {
    font-size: 16px;
}

.logo a {
    color: white;
    text-decoration: none;
    transition: 0.5s;
}

.logo a:hover,
.logo a.active {
    color: #d8b75d;
}

.btn {
    background-color: #ffffff;
    border: 1px solid white;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn a {
    font-size: 16px;
    text-decoration: none;
    color: #000000;
}

.btn:hover {
    transform: scale(1.1);
}

/* From Uiverse.io by anandita-3217 */
.switch1 {
    font-size: 17px;
    position: absolute;
    top: 0px;
    bottom: auto;
    right: 90px;
    display: flex;
    width: 3.5em;
    height: 2em;
}
.switch1 input {
    /* all: unset; */
    opacity: 0;
    width: 0;
    height: 0;
}
.slider1 {
    background-color: #2185d6;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    transition: 0.4s;
    border-radius: 30px;
    box-shadow: 0 0 0 rgba(33, 133, 214, 0);
    transition: all 0.4s ease;
}
.slider1:hover {
    box-shadow: 0 0 15px rgba(33, 133, 214, 0.5);
}

.slider1::before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    border-radius: 50%;
    left: 10%;
    bottom: 15%;
    box-shadow: inset 15px -4px 0px 15px #fdf906;
    background-color: #28096b;
    transition: all 0.4s ease;
    transform-origin: center;
}
.slider1:hover::before {
    transform: rotate(45deg);
}
.clouds_stars1 {
    position: absolute;
    content: "";
    border-radius: 50%;
    height: 10px;
    width: 10px;
    left: 70%;
    bottom: 50%;
    background-color: #fff;

    transition: all 0.3s;
    box-shadow:
        -12px 0 0 0 white,
        -6px 0 0 1.6px white,
        0.3px 16px 0 white,
        -6.5px 16px 0 white;
    filter: blur(0.55px);
}
.switch1 input:checked ~ .clouds_stars1 {
    transform: translateX(-20px);
    height: 2px;
    width: 2px;
    border-radius: 50%;
    left: 80%;
    top: 15%;
    background-color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow:
        -7px 10px 0 #fff,
        8px 15px 0 #fff,
        -17px 1px 0 #fff,
        -20px 10px 0 #fff,
        -7px 23px 0 #fff,
        -15px 25px 0 #fff;
    filter: none;
    animation: twinkle 2s infinite;
}
.switch1 input:checked + .slider1 {
    background-color: #28096b !important;
}
.switch1 input:checked + .slider1::before {
    transform: translateX(100%);
    box-shadow: inset 8px -4px 0 0 #fff;
}
.switch1 input:checked + .slider1:hover::before {
    transform: translateX(100%) rotate(-45deg);
}
@keyframes twinkle {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Efek hover */
#dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Efek saat tombol diklik */
#dark-mode-toggle:active {
    transform: scale(0.9) rotate(30deg);
}

/* From Uiverse.io by anandita-3217 */
.switch {
    font-size: 17px;
    position: absolute;
    top: 18px;
    right: 150px;
    display: inline-block;
    width: 3.5em;
    height: 2em;
}
.switch input {
    /* all: unset; */
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    background-color: #2185d6;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
    transition: 0.4s;
    border-radius: 30px;
    box-shadow: 0 0 0 rgba(33, 133, 214, 0);
    transition: all 0.4s ease;
}
.slider:hover {
    box-shadow: 0 0 15px rgba(33, 133, 214, 0.5);
}

.slider::before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    border-radius: 50%;
    left: 10%;
    bottom: 15%;
    box-shadow: inset 15px -4px 0px 15px #fdf906;
    background-color: #28096b;
    transition: all 0.4s ease;
    transform-origin: center;
}
.slider:hover::before {
    transform: rotate(45deg);
}
.clouds_stars {
    position: absolute;
    content: "";
    border-radius: 50%;
    height: 10px;
    width: 10px;
    left: 70%;
    bottom: 50%;
    background-color: #fff;

    transition: all 0.3s;
    box-shadow:
        -12px 0 0 0 white,
        -6px 0 0 1.6px white,
        0.3px 16px 0 white,
        -6.5px 16px 0 white;
    filter: blur(0.55px);
}
.switch input:checked ~ .clouds_stars {
    transform: translateX(-20px);
    height: 2px;
    width: 2px;
    border-radius: 50%;
    left: 80%;
    top: 15%;
    background-color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    box-shadow:
        -7px 10px 0 #fff,
        8px 15px 0 #fff,
        -17px 1px 0 #fff,
        -20px 10px 0 #fff,
        -7px 23px 0 #fff,
        -15px 25px 0 #fff;
    filter: none;
    animation: twinkle 2s infinite;
}
.switch input:checked + .slider {
    background-color: #28096b !important;
}
.switch input:checked + .slider::before {
    transform: translateX(100%);
    box-shadow: inset 8px -4px 0 0 #fff;
}
.switch input:checked + .slider:hover::before {
    transform: translateX(100%) rotate(-45deg);
}
@keyframes twinkle {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Efek hover */
#dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Efek saat tombol diklik */
#dark-mode-toggle:active {
    transform: scale(0.9) rotate(30deg);
}

/* ireng */
:root {
    --bg-color: #333;
    --font-color: #fff;
    --section-color: #444;
    --card-color: #555;
}

body.dark-mode {
    background-color: var(--bg-color);
    color: var(--font-color);
}

body.dark-mode .animate a {
    color: #fff;
    font-weight: 800;
}

body.dark-mode .animate.pop {
    background: var(--section-color);
    color: var(--font-color);
}
body.dark-mode .animate.pop:hover {
    border: 2px solid #fff;
}

body.dark-mode header {
    filter: brightness(80%);
}

body.dark-mode h1 {
    filter: brightness(100%);
}

body.dark-mode .timeline-section {
    background-color: var(--section-color);
}

body.dark-mode .timeline-content {
    background-color: var(--card-color);
}

body.dark-mode .timeline-content p {
    color: var(--font-color);
}

body.dark-mode blockquote {
    background: var(--section-color);
    color: #fff;
}

body.dark-mode .quiz-section {
    background-color: var(--section-color);
    color: var(--font-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    * {
        font-size: 14px;
    }

    body {
        width: 100%;
    }

    header {
        border-radius: 0 0 20px 20px;
        padding: 90px 20px;
    }

    header h1 {
        text-decoration: none;
        font-size: 2.5rem;
        font-weight: bold;
    }

    h2 {
        font-size: 16px;
    }

    .animate a {
        font-size: 16px;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #121212;
        position: sticky;
        top: 0;
    }

    .logo a:hover {
        color: #d8b75d;
    }

    .btn {
        background-color: #ffffff;
        border: 1px solid white;
        padding: 5px 15px;
        border-radius: 15px;
        cursor: pointer;
        transition: 0.5s;
    }

    .btn a {
        font-size: 14px;
        text-decoration: none;
        color: #000000;
    }

    .btn a:hover {
        color: #ffffff;
    }

    .btn:hover {
        background-color: #333333;
    }

    .awal {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #121212;
        padding: 10px 0 10px 10px;
    }

    .switch {
        right: 127px;
    }

    .dropdown {
        float: right;
        overflow: hidden;
    }

    .dropdown-content {
        left: -270px;
        position: absolute;
        background-color: #232323;
        min-width: 350px;
        max-width: 100%;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
        z-index: 2;
        animation: drop 0.5s ease;
    }

    .dropdown-content a {
        float: none;
        color: rgb(255, 255, 255);
        padding: 12px 11px;
        text-decoration: none;
        display: block;
        text-align: center;
        animation: drop 0.5s ease;
    }

    .dropdown-content a:hover {
        transform: scale(1);
    }

    .footer-social,
    .footer-links {
        margin-top: 10%;
    }

    @keyframes drop {
        0% {
            opacity: 0;
            transform: translateY(-20px);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
