/* --- DARK MODE BASES --- */
:root {
    --aura-color: #d4af37;
    /* Default Gold, updated by JS */
}

/* --- DARK MODE BASES --- */
:root {
    --aura-color: #d4af37;
    /* Default Gold, updated by JS */
}

/* --- LANGUAGE SWITCHER --- */
.lang-switch-container {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1000;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-btn {
    background: none;
    border: none;
    color: #636e72;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.lang-btn.active {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.lang-btn:hover {
    color: #b2bec3;
}

.lang-divider {
    color: #636e72;
    margin: 0 2px;
}

body {
    margin: 0;
    background: radial-gradient(circle at 50% 50%, #1e272e 0%, #111417 100%);
    background-size: 200% 200%;
    animation: breathingBackground 15s ease-in-out infinite;
    font-family: 'Open Sans', 'Noto Sans JP', sans-serif;
    color: #dfe6e9;
    overflow-x: hidden;
}

@keyframes breathingBackground {
    0% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 50% 0%;
    }

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

/* --- PAGE NAVIGATION SYSTEM --- */
.page-section {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 80px;
}

/* --- LOGO STYLES (Closed Box + Shake) --- */
.brand-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 120px;
    height: 140px;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

/* SHAKE ANIMATION */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }

    75% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Trigger Shake ONLY on Icon Hover */
.logo-icon:hover {
    animation: shake 0.4s ease-in-out infinite;
}

.logo-text {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 12px;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    line-height: 1;
    text-transform: uppercase;
}

/* --- HOMEPAGE STYLES --- */
.home-hero {
    text-align: center;
    /* Hero should easily fit inside visual viewport. */
    min-height: calc(100vh - 80px);
    /* 80px is padding-top of main-container */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home-subtitle {
    font-size: 1.1rem;
    color: #b2bec3;
    margin-bottom: 60px;
    line-height: 2;
    font-weight: 500;
    letter-spacing: 2px;
    font-family: 'Shippori Mincho', serif;
}

.home-btn-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.btn-start {
    background: linear-gradient(45deg, #6c5ce7, #a29bfe);
    border: none;
    padding: 15px 60px;
    font-size: 1.2rem;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
    font-family: 'Shippori Mincho', serif;
    letter-spacing: 2px;
}

.btn-start:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.5);
    color: white;
}

.btn-start:active {
    transform: scale(0.95);
    box-shadow: 0 5px 10px rgba(108, 92, 231, 0.4);
}

.btn-about {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 40px;
    font-size: 1rem;
    border-radius: 50px;
    color: #dfe6e9;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    max-width: 300px;
    font-family: 'Shippori Mincho', serif;
    letter-spacing: 1px;
}

.btn-about:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.btn-about:active {
    transform: scale(0.95);
}

/* --- PENTAGON ABOUT SECTION --- */
.about-section {
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 700px;
}

.pentagon-container {
    position: relative;
    width: 480px;
    height: 480px;
    margin: 60px auto;
}

/* The Center Display (Dynamic Info) */
.pentagon-center-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    text-align: center;
    z-index: 0;
    pointer-events: none;
}

.center-title {
    font-family: 'Shippori Mincho', serif;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    letter-spacing: 2px;
    transition: opacity 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

.center-desc {
    font-size: 1rem;
    color: #dfe6e9;
    line-height: 1.8;
    letter-spacing: 1px;
    transition: opacity 0.2s ease;
}

/* The Nodes (Foxes) Container */
.pentagon-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Inner Wrapper for Hover Effects (Scaling without breaking position) */
.pentagon-node-inner {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pentagon-node-inner svg {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    /* Ensure pixel art stays sharp */
}

/* Hover Scale & Glow */
.pentagon-node:hover .pentagon-node-inner {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
}

.pentagon-node-inner img,
.mood-icon-img {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    /* Ensure pixel art stays sharp */
}

/* Specific size for result ring */
.mood-ring-visual .mood-icon-img {
    width: 150px;
    height: 150px;
}

/* Animation Trigger */
.pentagon-container.animate .pentagon-node:nth-child(2) {
    transition-delay: 0.1s;
}

.pentagon-container.animate .pentagon-node:nth-child(3) {
    transition-delay: 0.2s;
}

.pentagon-container.animate .pentagon-node:nth-child(4) {
    transition-delay: 0.3s;
}

.pentagon-container.animate .pentagon-node:nth-child(5) {
    transition-delay: 0.4s;
}

.pentagon-container.animate .pentagon-node:nth-child(6) {
    transition-delay: 0.5s;
}


/* --- QUIZ STYLES --- */
.back-nav {
    margin-bottom: 30px;
}

.btn-back {
    color: #b2bec3;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 600;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 0;
}

.btn-back:hover {
    color: white;
}

.question-box {
    background: #2d3436;
    border-radius: 15px;
    padding: 40px 40px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.question-box.completed {
    opacity: 0.3;
    filter: blur(2px) grayscale(0.5);
    transform: scale(0.98);
}

.question-box.completed:hover {
    opacity: 1;
    filter: none;
    transform: scale(1) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
    display: block;
}

.scale-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px 0;
    position: relative;
}

.scale-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 30px;
    right: 30px;
    height: 2px;
    background: #636e72;
    z-index: 0;
    transform: translateY(-50%);
}

.scale-option {
    position: relative;
    z-index: 1;
    background: #2d3436;
    border-radius: 50%;
}

.scale-input {
    display: none;
}

.scale-label {
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: block;
    background-color: #2d3436;
    border-style: solid;
    border-width: 2px;
    position: relative;
}

.scale-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input:checked+.scale-label::after {
    transform: translate(-50%, -50%) scale(1);
}

.size-1,
.size-5 {
    width: 65px;
    height: 65px;
}

.size-1::after,
.size-5::after {
    font-size: 1.8rem;
}

.size-2,
.size-4 {
    width: 45px;
    height: 45px;
}

.size-2::after,
.size-4::after {
    font-size: 1.4rem;
}

.size-3 {
    width: 30px;
    height: 30px;
}

.size-3::after {
    font-size: 1rem;
}

input[value="1"]+.scale-label,
input[value="2"]+.scale-label {
    border-color: #ff7675;
    color: #ff7675;
}

input[value="1"]+.scale-label:hover,
input[value="2"]+.scale-label:hover,
input[value="1"]:checked+.scale-label,
input[value="2"]:checked+.scale-label {
    background-color: #ff7675;
    box-shadow: 0 0 20px rgba(255, 118, 117, 0.4);
    transform: scale(1.1);
    border-color: #ff7675;
}

input[value="3"]+.scale-label {
    border-color: #636e72;
}

input[value="3"]+.scale-label:hover,
input[value="3"]:checked+.scale-label {
    background-color: #b2bec3;
    border-color: #b2bec3;
    transform: scale(1.2);
}

input[value="4"]+.scale-label,
input[value="5"]+.scale-label {
    border-color: #0984e3;
}

input[value="4"]+.scale-label:hover,
input[value="5"]+.scale-label:hover,
input[value="4"]:checked+.scale-label,
input[value="5"]:checked+.scale-label {
    background-color: #0984e3;
    box-shadow: 0 0 20px rgba(9, 132, 227, 0.4);
    transform: scale(1.1);
    border-color: #0984e3;
}

.scale-labels-text {
    display: flex;
    justify-content: space-between;
    max-width: 500px;
    margin: 15px auto 0;
    font-size: 0.85rem;
    font-weight: 700;
}

.label-disagree {
    color: #ff7675;
}

.label-neutral {
    color: #636e72;
    font-weight: 400;
}

.label-agree {
    color: #0984e3;
}

.btn-reveal {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #0984e3;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(9, 132, 227, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0 auto;
    padding: 0;
    cursor: pointer;
}

.btn-reveal:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 0 30px rgba(9, 132, 227, 0.6);
    background-color: #74b9ff;
}

.btn-reveal:active {
    transform: scale(0.95);
    box-shadow: 0 0 10px rgba(9, 132, 227, 0.3);
}

/* Disabled state */
.btn-reveal:disabled {
    background: #636e72;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.5;
}

.btn-reveal:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-reveal svg {
    width: 42px;
    height: 42px;
    fill: white;
    transition: transform 0.3s ease;
}

.btn-reveal:hover svg {
    transform: translateX(3px);
}

/* --- WAIVER STYLES --- */
.waiver-container {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.waiver-label {
    color: #b2bec3;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.waiver-label:hover {
    color: white;
}

.waiver-checkbox {
    accent-color: #0984e3;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Waiver Link Styling */
.waiver-link-text {
    text-decoration: none;
    border-bottom: 1px dotted #b2bec3;
}

/* The Asterisk/Question Mark Icon */
.waiver-icon {
    width: 16px;
    height: 16px;
    fill: #b2bec3;
    transition: fill 0.3s ease;
    vertical-align: middle;
    margin-left: 2px;
}

.waiver-label:hover .waiver-icon {
    fill: #d4af37;
}

/* --- IN-PAGE FEEDBACK STYLES --- */
.feedback-inline {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
}

/* History Item Styling */
.history-item {
    transition: background-color 0.2s;
    padding: 10px;
    border-radius: 5px;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.history-item:last-child {
    border-bottom: none !important;
}

.feedback-title {
    font-size: 0.9rem;
    color: #b2bec3;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.star-rating {
    font-size: 2rem;
    color: #636e72;
    cursor: pointer;
    display: flex;
    justify-content: center;
    flex-direction: row-reverse;
    /* For CSS hover magic */
    gap: 8px;
}

.star {
    transition: color 0.2s, transform 0.2s;
}

/* Hover Effect: Highlight current and previous stars */
.star-rating .star:hover,
.star-rating .star:hover~.star {
    color: #d4af37;
    transform: scale(1.2);
}

/* Selected State */
.star.selected {
    color: #d4af37;
}

.feedback-message {
    color: #d4af37;
    font-size: 0.9rem;
    margin-top: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    height: 1.5em;
}

/* --- MODAL STYLES --- */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #2d3436;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid #636e72;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    color: #dfe6e9;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.modal-header {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
    border-bottom: 1px solid #636e72;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    line-height: 1.8;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.modal-close-btn {
    background: #0984e3;
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: block;
    margin: 0 auto;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: #74b9ff;
}


/* --- DARK RESULT OVERLAY --- */
#result-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e272e;
    z-index: 9999;
    overflow-y: auto;
    padding-top: 60px;
    padding-bottom: 60px;
    transition: background 1s ease;
    box-sizing: border-box;

    /* Removed conflicting 'display: flex' so JS visibility toggle works.
       Removed justify/align items that broke scroll behavior. */
}

/* --- RESULT REVEAL LOGIC --- */
/* (Reverted to handling visibility via JS script.js) */


.result-content {
    max-width: 900px;
    width: 100%;

    /* Safe Centering Strategy to prevent top-clipping but ensure perfectly horizontal & vertical center */
    margin: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.mood-ring-visual {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: #2d3436;
    margin-bottom: 25px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transition: all 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.mood-icon {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    animation: float-icon 3s ease-in-out infinite;
    image-rendering: pixelated;
}

#moodTitle {
    text-shadow: 0 0 15px currentColor;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

#moodDesc {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1rem;
    margin-bottom: 30px;
    max-width: 500px;
    line-height: 1.6;
}

/* --- PARTICLES --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: float-up linear forwards;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

#omikujiRank {
    font-family: 'Shippori Mincho', serif;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 50px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fade-up 1s ease forwards 0.5s;
}

.fortune-grid {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 60px;
    opacity: 0;
    animation: fade-up 1s ease forwards 1.6s;
    flex-wrap: wrap;
}

.flip-card {
    background-color: transparent;
    width: 95px;
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.flip-card-back {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: rotateY(180deg);
    padding: 15px 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 20px 50px rgba(255, 255, 255, 0.05);
    /* Added slight top glare */
}

.flip-card:hover .flip-card-inner {
    transform: translateY(-10px);
}

.flip-card:hover .flip-card-front {
    border-color: var(--aura-color);
    box-shadow: 0 0 20px var(--aura-color);
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card.flipped:hover .flip-card-inner {
    transform: rotateY(180deg) translateY(-10px);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-front {
    background: linear-gradient(135deg, #2d3436 0%, #1e272e 100%);
    border: 2px solid var(--aura-color);
    opacity: 0.9;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.flip-card-back {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transform: rotateY(180deg);
    padding: 15px 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 20px 50px rgba(255, 255, 255, 0.05);
    /* Added subtle inner glare */
}

.fortune-label-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Shippori Mincho', serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--aura-color);
    letter-spacing: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.fortune-text-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 1px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.animate-pulse {
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
    }

    70% {
        box-shadow: 0 0 0 30px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.weather-select-container {
    max-width: 300px;
    margin: 0 auto 30px;
}

.form-select {
    background-color: #2d3436;
    color: #dfe6e9;
    border: 1px solid #636e72;
    text-align: center;
}

.form-select:focus {
    background-color: #2d3436;
    color: white;
    border-color: #0984e3;
    box-shadow: 0 0 0 0.25rem rgba(9, 132, 227, 0.25);
}

.form-label {
    color: #b2bec3;
}

/* --- RESPONSIVE STYLES --- */
@media (max-width: 768px) {
    .main-container {
        padding-top: 60px;
    }

    .home-hero {
        min-height: auto;
        padding: 40px 20px;
    }

    .logo-text {
        font-size: 2.5rem;
        letter-spacing: 6px;
    }

    .home-subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    /* Pentagon Scaling */
    .pentagon-container {
        transform: scale(0.65);
        transform-origin: center top;
        margin: 0 auto;
        /* Negative margin to reduce white space caused by scaling */
        margin-bottom: -150px;
    }

    .about-section {
        padding-top: 40px;
        min-height: auto;
        padding-bottom: 60px;
    }

    .fortune-grid {
        gap: 10px;
    }

    .flip-card {
        width: 80px;
        height: 320px;
    }

    .fortune-label-vertical {
        font-size: 1.5rem;
    }

    .fortune-text-vertical {
        font-size: 0.9rem;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 25px;
    }

    /* Result Overlay Mobile */
    #omikujiRank {
        font-size: 3.5rem;
    }

    .mood-ring-visual {
        width: 140px;
        height: 140px;
    }

    .mood-icon {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 400px) {
    .pentagon-container {
        transform: scale(0.55);
        transform-origin: center top;
        margin-bottom: -200px;
    }

    .logo-text {
        font-size: 2rem;
    }
}

/* --- SHOOTING STARS DE-LAGGED --- */
.shooting-star {
    position: fixed;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: -5;
    /* Pass behind all question UI elements */
    opacity: 0;
    will-change: transform, opacity;
    /* Force GPU acceleration */
    animation: shooting 4s ease-in-out forwards;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0.6), transparent);
}

@keyframes shooting {
    0% {
        transform: translate3d(0, 0, 0) rotate(-45deg);
        opacity: 0;
    }

    30% {
        opacity: 0.6;
    }

    70% {
        opacity: 0.6;
    }

    100% {
        transform: translate3d(-800px, 800px, 0) rotate(-45deg);
        opacity: 0;
    }
}

/* Float Animation for Home Logo */
.floating {
    animation: floatSlow 4s ease-in-out infinite;
}

@keyframes floatSlow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}