/* ====================<< Mode >>==================== */
/* ========== CSS Reset Start (Meyer + Custom) ========== */

/* --- Reset default styles for common HTML elements --- */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

/* --- Ensure HTML5 elements are block-level --- */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
    display: block;
}

/* --- Set base line-height for body --- */
body {
    line-height: 1;
}

/* --- Remove default list styling --- */
ol,
ul {
    list-style: none;
}

/* --- Remove default quote styling --- */
blockquote,
q {
    quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
    content: '';
    content: none;
}

/* --- Reset table spacing --- */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ========== CSS Reset End ========== */


/* ========== Basic Utility Styles ========== */

/* --- Set font-family for body --- */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

/* --- Remove underline and default link color --- */
a {
    text-decoration: none;
    color: inherit;
}

/* --- Responsive image scaling --- */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Remove form element default styles --- */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* --- Show pointer cursor on buttons --- */
button {
    cursor: pointer;
}

/* --- Use border-box for all elements to include padding/border in size --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========== Debug Tools (for development only) ========== */

/* --- Add 1px outline to all elements for layout debugging --- */
/* * {
    outline: 1px solid black;
} */

/* ====================<< Mode >>==================== */

:root {
    --space-black: #0b0c10;
    --star-silver: #c5c6c7;
    --nebula-purple: #6f42c1;
    --supernova-pink: #e83e8c;
    --cosmic-blue: #0d6efd;
    --galaxy-teal: #20c997;
    --solar-yellow: #f9c74f;
    --mars-red: #d62828;
    --venus-gold: #e4c580;
    --uranus-ice: #7ed6df;
    --neptune-blue: #4169e1;
    --milkyway-dust: #f8f9fa;
}

body {
    font-family: "Noto Sans TC", sans-serif;
    background: url('./image/background.jpg') center center / cover no-repeat;
    color: var(--milkyway-dust);
}

#scene {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    z-index: -1;
    overflow: hidden;
}

#scene li {
    width: 100%;
    height: 100%;
}

#scene li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mapLink {
    position: fixed;
    bottom: 3%;
    right: 3%;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.3s ease;
}

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

.mapLink img {
    display: block;
    width: 150px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(-10%, -10%);
    }

    50% {
        transform: translate(-10%, -20%);
    }
}

.map {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    z-index: -2;
    transition: opacity 0.5s ease-in-out;
}

.map .xIcon {
    position: absolute;
    font-size: 3rem;
    top: 5%;
    right: 5%;
    cursor: pointer;
}

.map .xIcon:hover {
    color: var(--star-silver);
}

.map img {
    width: 100%;
}

.title {
    text-align: center;
    padding: 50px 20px;
    color: var(--milkyway-dust);
}

.title h1,
.title p {
    position: relative;
    background: linear-gradient(90deg,
            var(--milkyway-dust) 0%,
            #fff 45%,
            var(--solar-yellow) 50%,
            #fff 55%,
            var(--milkyway-dust) 100%);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s infinite linear;
}

.title h1 {
    font-size: 3rem;
}

.title p {
    font-size: 2rem;
}

@keyframes shine {
    0% {
        background-position: 100%;
    }

    100% {
        background-position: -100%;
    }
}

@media (max-width: 400px) {
    .title h1 {
        font-size: 2.5rem;
    }

    .title p {
        font-size: 1.5rem;
    }
}

.search {
    max-width: 1000px;
    display: flex;
    align-items: center;
    margin: 0 auto;
    position: relative;
}

.search .searchInput {
    width: 100%;
    height: 56px;
    font-size: 20px;
    border: 1px solid var(--milkyway-dust);
    border-radius: 40px;
    padding: 16px 48px 16px 80px;
    margin: 0 3rem;
}

.search .searchInput::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.search .searchIcon {
    font-size: 24px;
    color: var(--milkyway-dust);
    position: absolute;
    top: 50%;
    left: 80px;
    transform: translateY(-50%);
}

.search .searchIcon:hover {
    font-size: 30px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px;
    position: relative;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s;
    display: flex;
    gap: 2rem;
}

.card img {
    width: 50%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 5px #fff5);
}

.card .info {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card .info h3 {
    font-size: 30px;
}

.card .info .description {
    margin-top: 1rem;
    line-height: 2;
}

.prevBtn,
.nextBtn {
    color: var(--milkyway-dust);
    opacity: 0.5;
    font-weight: bold;
    top: 50%;
    transform: translate(0, -25%);
}

.prevBtn:hover,
.nextBtn:hover {
    color: var(--uranus-ice);
}

@media (max-width: 700px) {
    .card {
        flex-direction: column;
    }

    .card img {
        width: 100%;
    }

    .card .info {
        width: 100%;
    }
}