:root {
    --primary-color: #FFB6C1;
    /* Light Pink */
    --secondary-color: #FFF0F5;
    /* Lavender Blush */
    --text-color: #554444;
    /* Soft Brown/Grey */
    --accent-color: #FF69B4;
    /* Hot Pink */
    --font-main: 'Yomogi', cursive;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Header / Hero Section */
.hero-header {
    background-color: #fff;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 4px dashed var(--primary-color);
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: row;
    /* Always side-by-side */
    justify-content: center;
    align-items: center;
    gap: 2%;
    /* Responsive gap */
    max-width: 800px;
    width: 100%;
    position: relative;
    padding: 0 10px;
    /* Safety padding */
}

/* Video Layout */
.video-container {
    width: 45%;
    /* Relative width */
    max-width: 300px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    /* Start relative */
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 32px rgba(255, 182, 193, 0.4);
    background-color: #fff;
    /* Placeholder for video area */
    margin-bottom: 1rem;
    animation: morph-shape 8s ease-in-out infinite;
    /* Added Animation */
}

/* Morphing Animation */
@keyframes morph-shape {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    50% {
        border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    }

    75% {
        border-radius: 70% 30% 50% 50% / 30% 50% 70% 50%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Name and Sprout Layout */
.name-logo-container {
    position: relative;
    width: 50%;
    /* Relative width */
    max-width: 350px;
    /* Adjust based on image size */
    aspect-ratio: 2 / 1;
    /* Approximate aspect ratio to maintain space */
    height: auto;
    /* Adjust based on image size */
    display: flex;
    justify-content: center;
    align-items: center;
}

.name-img {
    position: relative;
    z-index: 10;
    /* Front */
    width: 100%;
    height: auto;
    object-fit: contain;
}


.sprout-img {
    position: absolute;
    /* Changed relative to container */
    /* z-index: 12; */
    /* Keep on top as requested */
    top: -20%;
    /* Relative offset */
    left: 70%;
    /* Adjust horizontal position */
    width: 40%;
    /* Responsive width linked to container size */
    height: auto;
    animation: float-sprout 3s ease-in-out infinite;
}

/* Animation for Sprout */
@keyframes float-sprout {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Main Content */
.main-content {
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.intro-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    width: 100%;
    text-align: center;
    border: 2px solid var(--secondary-color);
}

h1 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* Profile Card Container - Mobile First */
.profile-card {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    /* Default mobile max-width */
    width: 100%;
    margin-top: 2rem;
    border: 2px solid var(--secondary-color);
    text-align: left;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section h3 {
    color: var(--primary-color);
    border-bottom: 2px dashed var(--secondary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* ... (Basic Info, Mic, Social, Status, OK/NG styles remain the same) ... */

/* Basic Info */
.basic-info {
    list-style: none;
    padding: 0;
}

.basic-info li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.basic-info li span {
    font-weight: bold;
    color: var(--accent-color);
    width: 160px;
    display: inline-block;
}

/* Mic Gauges */
.gauge-wrapper {
    margin-bottom: 1rem;
}

.gauge-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--text-color);
}

.gauge-bar {
    background-color: var(--secondary-color);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.gauge-fill {
    background-color: var(--accent-color);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease-out;
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.link-btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.link-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.discord-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
    background-color: #eaedff;
    border-radius: 20px;
}

/* Status List */
.status-list {
    list-style: none;
}

.status-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.status-list li::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-blue::before {
    background-color: #87CEFA;
}

.status-green::before {
    background-color: #98FB98;
}

.status-orange::before {
    background-color: #FFA07A;
}

.status-red::before {
    background-color: #FF6347;
}

/* OK/NG Table */
.ok-ng-table {
    width: 100%;
    border-collapse: collapse;
}

.ok-ng-table th,
.ok-ng-table td {
    padding: 0.5rem;
    border-bottom: 1px dashed var(--secondary-color);
}

.ok-ng-table th {
    text-align: left;
    color: var(--accent-color);
    width: 40%;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Responsive Layout */
@media (min-width: 900px) {

    /* Main Layout */
    .header-content {
        gap: 3rem;
    }

    /* Profile Card Grid Layout for Desktop */
    .profile-card {
        max-width: 1200px;
        /* Wider card to use space */
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        /* 3 Columns */
        gap: 2rem;
        align-items: start;
        /* Grid Areas Definition */
        /* 
           Intro  Intro  Intro
           Basic  Mic    OKNG
           Links  Status OKNG
        */
        grid-template-areas:
            "intro intro intro"
            "basic mic   okng"
            "links status okng";
    }

    .profile-card h2 {
        grid-column: 1 / -1;
        /* Title full width */
        text-align: center;
    }

    .section-intro {
        grid-area: intro;
        text-align: center;
    }

    .section-basic {
        grid-area: basic;
    }

    .section-mic {
        grid-area: mic;
    }

    .section-status {
        grid-area: status;
    }

    .section-links {
        grid-area: links;
    }

    .section-okng {
        grid-area: okng;
        background: var(--secondary-color);
        padding: 1.5rem;
        border-radius: 15px;
        height: 100%;
        /* Fill height */
    }
}

/* Recommendation Widget (Small Window) */
.recommend-widget {
    position: fixed;
    /* Position relative to top to allow smooth transition to top: 20px */
    top: calc(100vh - 240px);
    /* Height approx 200px + 20px margin + 20px buffer */
    right: 20px;
    width: 280px;
    background: #fff;
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    /* Above everything */
    overflow: hidden;
    animation: pop-in 0.5s ease-out;
    /* Soft, fluffy landing (Expo Ease Out) without harsh bounce */
    transition: top 1.5s cubic-bezier(0.19, 1, 0.22, 1), transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: top right;
}

/* Moved Up State */
.recommend-widget.move-up {
    top: 20px;
    transform: scale(0.5);
}

.widget-header {
    background: var(--secondary-color);
    color: var(--accent-color);
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px dashed var(--primary-color);
}

.widget-video {
    width: 100%;
    aspect-ratio: 16 / 9;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile check for widget */
@media (max-width: 480px) {
    .recommend-widget {
        width: 200px;
        /* Height approx 112 + 35 = 150px. Top = 100vh - 170px */
        top: calc(100vh - 170px);
        right: 10px;
    }

    .recommend-widget.move-up {
        top: 10px;
        /* Scale is applied via class */
    }
}

/* Secret Overlay */
.secret-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    /* Topmost */
    pointer-events: none;
    /* Click through when inactive */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.secret-overlay.active {
    pointer-events: auto;
    /* Enable clicks when active */
}

/* The Expanding White Circle */
.expanding-circle {
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.secret-overlay.active .expanding-circle {
    transform: scale(100);
    /* Expand to fill screen */
}

/* The Hidden Text */
.secret-text-container {
    position: relative;
    z-index: 10000;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 1s, transform 1s ease 1s;
    /* Delay to wait for circle */
    color: var(--accent-color);
}

.secret-overlay.active .secret-text-container {
    opacity: 1;
    transform: translateY(0);
}

.secret-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.secret-text.small {
    font-size: 1.2rem;
    color: var(--text-color);
}

.personal-message-box {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 2px dashed var(--primary-color);
    border-radius: 15px;
    background-color: #fff0f580;
    /* Semi-transparent lavender */
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 2s, transform 1s ease 2s;
    /* Longer delay than main text */
}

.secret-overlay.active .personal-message-box {
    opacity: 1;
    transform: translateY(0);
}

.click-to-close {
    margin-top: 3rem;
    font-size: 0.8rem;
    color: #ccc;
    animation: pulse 2s infinite;
}

/* Gallery Styles - 3D Slideshow */
.gallery-container {
    position: relative;
    z-index: 10000;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* No scrollbar, auto scroll */
    padding: 0;
    opacity: 0;
    transition: opacity 1s ease 1s;
    /* Delay for circle */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.secret-overlay.active .gallery-container {
    opacity: 1;
}

.gallery-title {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px #fff;
    font-family: 'Yomogi', cursive;
    z-index: 100;
}

/* 3D Track */
.gallery-view {
    width: 100%;
    perspective: 1500px;
    /* Depth */
    overflow: hidden;
    padding: 2rem 0;
}

.gallery-track {
    display: flex;
    width: max-content;
    /* Fit content */
    gap: 2rem;
    transform-style: preserve-3d;
    animation: scroll-3d 40s linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
    /* Pause on hover */
}

.gallery-img {
    width: 400px;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid #fff;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.2);
    /* 3D Effect */
    transform: rotateY(25deg) scale(0.9);
    transition: transform 0.4s ease, box-shadow 0.4s ease, z-index 0s;
    opacity: 0.9;
}

/* Hover Effect: Bring to front and straighten */
.gallery-img:hover {
    transform: rotateY(0deg) scale(1.1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Infinite Scroll Animation */
@keyframes scroll-3d {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Move half way (since cloned) */
}

/* Mobile Adjustments for 3D */
@media (max-width: 768px) {
    .gallery-img {
        width: 280px;
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}