/* General Reset */
body,
html {
    font-family: "Montserrat", "Noto Sans TC", sans-serif;
    /* Simple and professional font */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Body Styling */
body {
    background-color: #000000;
    /*#282828*/
    color: #ffffff;
}

/* Content Container */
.container {
    max-width: 700px;
    width: 90%;
    margin: 50px auto;
    padding: 20px;
    background-color: #141414;
    border-radius: 12px;
    box-shadow: 0 0px 20px rgb(227, 142, 142);
    overflow: hidden;
    position: relative;
}

.gif-container img {
    width: 49%;
    border-radius: 12px;
}

/* Duo Container */
.duo-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.duo-left,
.duo-right {
    width: 50%;
    background-color: #2f2f2f;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sub-container {
    width: 90%;
    background-color: #363636;
    color: #272727;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Heading Styling */
.heading {
    font-size: 2rem;
    text-align: left;
    color: #d47a13;
    padding-top: 5px;
    font-weight: bold;
    line-height: 1;
    margin: 0;
}

.head-detail {
    font-size: 1.2rem;
    text-align: left;
    color: #dddddd;
    line-height: 1;
    padding-bottom: 10px;

}

.date {
    font-size: 0.85rem;
    /* Slightly smaller than the heading */
    color: #6b6b6b;
    /* Neutral gray to keep it subtle */
    font-weight: 400;
    /* Light font weight */
    position: relative;
    /* Position relative to the heading */
    text-align: right;
}

.subcodeheading {
    font-size: 1.6rem;
    text-align: left;
    color: #d47a13;
    padding-top: 5px;
    font-weight: bold;
    line-height: 2;
    margin-top: 10px;
}

.subheading {
    font-size: 1.4rem;
    font-weight: bold;
    text-align: left;
    color: #e6621b;
    line-height: 1.5;
}

.yellowsubheading {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: left;
    color: #c89b13;
    line-height: 1;
}

/* Paragraph Styling */
.paragraph {
    font-size: 0.95rem;
    line-height: 1.2;
    color: #e6e6e6;
    margin-bottom: 25px;
    text-align: justify;
}

/* Bullet Point */
ul {
    margin: 20px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.li {
    font-size: 0.95rem;
    line-height: 0.8;
    color: #e6e6e6;
    margin-bottom: 25px;
    text-align: justify;
}

ul li {
    font-size: 0.95rem;
    line-height: 1;
    color: #666;
    text-align: justify;
    margin-bottom: 25px;
    position: relative;
}

/* Image Styling */
.image {
    width: 100%;
    height: auto;
    margin: 20px 0;
    display: block;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Screenshot Container: must use with script */
.screenshot-container {
    display: grid;
    gap: 5px;
    /* Spacing between images */
    margin: 20px auto;
    max-width: 100%;
    justify-content: center;
    /* Center content within the container */
    align-items: center;
    /* Vertically align content */
}

.screenshot {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 5px;
    display: block;
}

/* YouTube Embed */
.youtube-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 20px 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

.button-green:hover {
    background-color: #105f31;
    transform: translateY(-2px);
}

.button {
    display: inline-block;
    padding: 10px 25px;
    font-size: 0.9rem;
    color: #fff;
    background-color: #dc9a17;
    text-align: center;
    text-decoration: none;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s ease;}

.button:hover {
    background-color: #725417;
    transform: translateY(-2px);
}


.image-lightbox {
    width: 100%; /* Default to fill the width of the container */
    height: 100%; /* Maintain aspect ratio */
    max-width: 100vw; /* Prevent the image from exceeding the viewport width */
    max-height: 100vh; /* Prevent the image from exceeding the viewport height */
    object-fit: contain; /* Ensure the entire image is visible without distortion */
    display: block; /* Ensure it's treated as a block element for proper centering */
    margin: auto; /* Center the image within its container */
}



/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling */
    background-color: rgba(0, 0, 0, 0.9); /* Darker background for full-screen effect */
}

/* Modal Content: Full-Screen */
.modal-content {
    position: relative;
    background-color: transparent; /* No background color */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    width: 100%;
    height: 100%;
    display: flex; /* Center images */
    justify-content: center;
    align-items: center;
}

/* Images inside the modal */
.modal-content img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%; /* Ensure images fit within the viewport */
    margin: 0; /* Remove white space caused by margins */
    padding: 0; /* Remove padding */
    display: block;
    object-fit: contain; /* Maintain aspect ratio */
}

/* Close Button */
.close {
    color: white;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 35px;
    font-weight: bold;
    z-index: 2;
}

.close:hover,
.close:focus {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

/* Next/previous buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for better visibility */
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Position the next button to the right */
.next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}

/* Position the prev button to the left */
.prev {
    left: 20px;
    border-radius: 0 3px 3px 0;
}

/* Caption container */
.caption-container {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    background-color: rgba(0, 0, 0, 0.26);
    padding: 10px 0;
    font-size: 16px;
    z-index: 2;
}

.numbertext {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 18px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5); /* Optional background for readability */
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1000; /* Ensure it's on top */
}

/* Mobile First Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 90%;
    }

    .gif-container img {
        width: 100%;
    }

    .heading {
        font-size: 1.8rem;
        padding-top: 15px;
        padding-bottom: 0px;
    }

    .subcodeheading {
        font-size: 1.4rem;
        margin-top: 10px;
    }

    .date {
        font-size: 0.7rem;
    }

    .head-detail {
        font-size: 1.2rem;
    }

    .subheading {
        font-size: 1.3rem;
    }

    .paragraph {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .duo-container {
        flex-direction: column;
        gap: 10px;
        padding: 0;
        /* Reset padding to prevent overflow */
    }

    .duo-left,
    .duo-right {
        width: calc(100% - 10%);
        /* Leave space from the edges */
        margin: 0 auto;
        /* Center items */
    }
}

/* Large Screen Styles */
@media (min-width: 1024px) {
    .container {
        padding: 40px;
    }

    .heading {
        font-size: 2.5rem;
        padding-top: 30px;
    }

    .head-detail {
        font-size: 1.2rem;
    }

    .paragraph {
        font-size: 1rem;
        line-height: 1.7;
    }
}