/* =========================================
   CSS Variables & Reset
   ========================================= */
:root {
    --primary-color: #FFB6C1;
    /* Light Pink */
    --secondary-color: #FFD1DC;
    /* Pastel Pink */
    --accent-color: #FF8DA1;
    /* Soft Coral Pink Accent */
    --bg-color: #FFF5F6;
    /* Very light pink/white background */
    --text-main: #4A4A4A;
    --text-light: #7A7A7A;
    --white: #FFFFFF;
    --shadow: 0 8px 16px rgba(255, 182, 193, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography elements */
h1,
h2,
h3 {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    color: var(--accent-color);
    text-align: center;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    outline: none;
}

/* =========================================
   Utility Classes
   ========================================= */
.hidden {
    display: none !important;
}

.active {
    display: block;
}

/* Smooth fade-in animation */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Intro Page
   ========================================= */
#intro-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-color) 100%);
    position: relative;
}

.intro-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 500px;
    z-index: 1;
}

.intro-disclaimer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--black);
    opacity: 0.6;
    width: 90%;
    text-align: center;
    pointer-events: none;
    word-break: keep-all;
}

.main-title {
    font-size: clamp(1.1rem, 6vw, 2rem);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    word-break: keep-all;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(255, 105, 180, 0.3);
    transition: var(--transition);
}

.primary-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 105, 180, 0.4);
}

/* =========================================
   Main Page Layout
   ========================================= */
#main-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

header.hide-header {
    transform: translate3d(0, -100%, 0);
    will-change: transform;
}

.menu-bar {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    /* allow wrapping on very small screens */
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-btn {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

@media (hover: hover) and (pointer: fine) {
    .nav-btn:hover {
        color: var(--accent-color);
        background-color: var(--secondary-color);
    }
}

.nav-btn.active {
    color: var(--white);
    background-color: var(--accent-color);
}

.content-container {
    flex-grow: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* =========================================
   Content Sections
   ========================================= */

/* Billboard (Main Image & Plaque) */
.billboard-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    /* Stack image and plaque */
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.billboard-container picture {
    width: 100%;
}

.billboard-container picture img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
}

.secret-billboard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--white);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
    z-index: 10;
}

.secret-billboard.revealed {
    opacity: 1;
    pointer-events: auto;
}

/* Artwork Plaque (Museum Style) */
.artwork-plaque {
    background-color: #FAFAFA;
    /* Off-white museum label color */
    border: 1px solid #E0E0E0;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.05);
    /* Soft, grounded shadow */
    border-radius: 4px;
    /* Sharp corners like a real plaque */
    text-align: center;
    position: relative;
}

/* Subtle inner border for a framed look */
.artwork-plaque::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

.plaque-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.artwork-title {
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    word-break: keep-all;
}

.artwork-desc {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.artwork-artist {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.artwork-artist strong {
    color: var(--text-main);
}

/* Easter Egg Icon */
.easter-egg-icon {
    width: auto;
    height: 1.2em;
    vertical-align: middle;
    margin-bottom: 4px;
}

/* Sponsors List */
.sponsors-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.sponsor-item {
    background-color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    width: 100%;
    max-width: 550px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    /* Keep ribbon inside border radius */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sponsor-item:hover {
    transform: translateY(-3px);
}

/* Sponsor Header (Name, Icon, Amount) */
.sponsor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed var(--secondary-color);
    padding-bottom: 0.8rem;
}

.sponsor-info-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sponsor-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.sponsor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
    /* For emoji */
}

.sponsor-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sponsor-amount {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
}

/* Sponsor Message */
.sponsor-message {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.5rem 0 1rem 0;
    /* Extra bottom padding for ribbon space */
    position: relative;
    z-index: 1;
    /* Above ribbon */
    word-break: keep-all;
}

/* Ribbon Decoration (Right Bottom Tilt) */
.sponsor-ribbon {
    position: absolute;
    bottom: 5px;
    right: 15px;
    font-size: 1.8rem;
    transform: rotate(-15deg);
    opacity: 0.8;
    z-index: 0;
    user-select: none;
}

/* --- Tier Styles (Design Proposal 1) --- */

/* Tier 4 (VVIP - Gradient) */
.sponsor-item.tier-4 {
    border: 2.5px solid transparent;
    background-image: linear-gradient(#FFF5F6, #FFF5F6), linear-gradient(135deg, #FF6680, #FFD700);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 20px rgba(255, 102, 128, 0.4);
}

.sponsor-item.tier-4:hover {
    box-shadow: 0 0 30px rgba(255, 102, 128, 0.7);
}

.sponsor-item.tier-4 .sponsor-name,
.sponsor-item.tier-4 .sponsor-amount {
    background: linear-gradient(135deg, #FF4D6D, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.sponsor-item.tier-4 .sponsor-name {
    font-size: 1.25rem;
}

.sponsor-item.tier-4 .sponsor-amount {
    font-size: 1.5rem;
}

/* Tier 3 (Highest) */
.sponsor-item.tier-3 {
    border: 2px solid #FF8DA1;
    box-shadow: 0 0 15px rgba(255, 141, 161, 0.6);
    background-color: #FFF5F6;
    /* Very light pink */
}

.sponsor-item.tier-3:hover {
    box-shadow: 0 0 25px rgba(255, 141, 161, 0.8);
}

.sponsor-item.tier-3 .sponsor-name {
    color: #FF6680;
    /* Slightly darker pink for contrast */
}

.sponsor-item.tier-3 .sponsor-amount {
    font-size: 1.25rem;
}

/* Tier 2 (Middle) */
.sponsor-item.tier-2 {
    border: 1.5px solid #FFB6C1;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.4);
    background-color: #FFFFFF;
}

.sponsor-item.tier-2:hover {
    box-shadow: 0 8px 20px rgba(255, 182, 193, 0.6);
}

/* Tier 1 (Base) */
.sponsor-item.tier-1 {
    border: none;
    box-shadow: 0 8px 16px rgba(255, 182, 193, 0.2);
    background-color: #FFFFFF;
}

.sponsor-item.tier-1:hover {
    box-shadow: 0 12px 24px rgba(255, 182, 193, 0.3);
}

/* Notice Text (Guestbook, Sponsors, etc.) */
.notice-text {
    font-size: 0.85rem;
    color: #888;
    text-align: right;
    letter-spacing: -0.5px;
    word-break: keep-all;
    /* 단어 단위 줄바꿈 */
    overflow-wrap: break-word;
    /* 긴 단어 강제 줄바꿈 방지 */
    width: 100%;
    margin-top: -5px;
}

/* Fanart Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 3px;
    /* Thin gap like Instagram */
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background-color: #f0f0f0;
    /* Placeholder background */
    position: relative;
    /* Removed padding, shadow, and border-radius for flat look */
}

/* Inner frame shadow effect removed */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item img.pos-top {
    object-position: top;
}

.gallery-item:hover img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}


/* Fanart Theater */
.theater-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.video-container {
    width: 100%;
    max-width: 800px;
    background-color: var(--white);
    padding: 1rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Maintains video ratio */
    height: auto;
    border-radius: 10px;
}

/* YouTube Facade styles */
.video-container.facade {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 16 / 9;
    padding: 0;
}

.video-container.facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

.video-container.facade:hover img {
    transform: scale(1.02);
    /* Subtle zoom on hover */
}

/* Red YouTube Play Button overlay */
.play-button {
    position: absolute;
    width: 68px;
    height: 48px;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 10px;
    transition: var(--transition);
    z-index: 1;
}

.play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent #fff;
}

.video-container.facade:hover .play-button {
    background-color: #ff0000;
}

/* Guestbook Footer (Load More) */
.guestbook-footer {
    display: flex;
    justify-content: center;
    width: 100%;
}


/* Credits */
.credits-list {
    text-align: center;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.credits-list p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    word-break: keep-all;
    overflow-wrap: break-word;
}

.credits-list strong {
    color: var(--accent-color);
    display: block;
    /* Stack on mobile slightly better */
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

/* =========================================
   Easter Egg: 
   ========================================= */
.secret-credit-area {
    cursor: help;
    position: relative;
    padding: 10px 0;
    margin-top: -10px;
    /* Adjust spacing to fit naturally */
}

.hint-key {
    color: #F8F8F8;
    /* Almost invisible against white background */
    font-size: 0.5rem;
    margin-left: 5px;
    user-select: none;
    transition: color 0.3s;
}

.secret-credit-area:hover .hint-key {
    color: #EAEAEA;
    /* Slightly more visible on hover */
}

.hidden-drag-msg {
    color: transparent;
    font-size: 1.1rem;
    /* Match other credits text size */
    margin-top: 5px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    transition: color 0.3s ease;
}

/* 터치/클릭 시 노출될 스타일 */
.secret-credit-area.revealed .hidden-drag-msg {
    background-color: transparent;
    color: var(--text-main);
}

/* 클릭 느낌을 주기 위한 효과 (선택) */
.secret-credit-area:active {
    transform: scale(0.98);
}

/* =========================================
   Footer SNS
   ========================================= */
footer {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1.5rem 0;
    border-top: 1px solid var(--secondary-color);
    margin-top: auto;
    /* Push to bottom */
    position: relative;
    overflow: hidden;
}

.sns-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.sns-btn {
    width: 50px;
    height: 50px;
    border-radius: 30%;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.sns-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sns-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Modal Styles
   ========================================= */
.modal {
    border: none;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    background-color: transparent;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    width: 100%;
    animation: fadeInModal 0.4s ease;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#modal-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#modal-img.loaded {
    opacity: 1;
}

/* Modal Loading Spinner & Info State */
.modal.loading .modal-info {
    opacity: 0;
    pointer-events: none;
}

/* Modal Loading Spinner Styles */
.modal-content {
    position: relative;
    min-height: 200px;
    /* Ensure space for spinner */
}

.spinner-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
    flex-direction: column;
    align-items: center;
}

.modal.loading .spinner-container {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: modal-spin 1s linear infinite;
}

@keyframes modal-spin {
    to {
        transform: rotate(360deg);
    }
}

/* For transparent images in modal */
#modal-img.has-white-bg {
    background-color: #ffffff;
}

.modal-info {
    width: 100%;
    max-width: 600px;
    text-align: center;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
    transition: opacity 0.5s ease;
}

#modal-author {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

#modal-desc {
    color: var(--text-main);
    font-size: 1rem;
    word-break: keep-all;
    /* 단어 단위 줄바꿈 */
    overflow-wrap: break-word;
    /* 긴 단어 강제 줄바꿈 방지 */
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}


/* =========================================
   Responsive Design / Mobile
   ========================================= */
@media screen and (max-width: 768px) {
    .menu-bar {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Removed 768px specific 2-column override to keep 3 columns everywhere */
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        /* Keep 3 columns on mobile, but tighten the gap and let it stretch edge-to-edge if needed */
        grid-template-columns: repeat(3, 1fr);
        grid-gap: 2px;
        margin: 0 -1rem;
        /* Negative margin to pull slightly past the 1rem container padding to touch edges more closely */
    }

    .gallery-item {
        max-width: 100%;
        margin: 0;
    }

    .video-container {
        padding: 0.5rem;
    }

    #modal-img {
        max-height: 60vh;
    }

    .sns-container {
        gap: 1rem;
    }

    /* Minigame responsive */
    .minigame-wrapper {
        gap: 0.6rem;
    }

    .minigame-header {
        padding: 0.4rem 1.2rem;
    }

    .minigame-score {
        font-size: 1.4rem;
    }

    .game-overlay-title {
        font-size: 1.3rem;
    }

    .leaderboard-list li {
        font-size: 0.82rem;
    }
}

/* =========================================
   Footnote / Tooltip
   ========================================= */
.footnote {
    color: #45575f;
    /* Nameuwiki-style blue link color */
    cursor: help;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 2px;
    position: relative;
    text-decoration: none;
    display: inline-block;
}

.footnote:hover {
    text-decoration: underline;
}

.footnote:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: normal;
    pointer-events: none;
    line-height: 1.4;
}

/* Tooltip Arrow */
.footnote:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    z-index: 1000;
    pointer-events: none;
}

/* =========================================
   Inline Style Extraction
   ========================================= */

/* 후원자 목록 안내 텍스트 */
.notice-text--sponsors {
    max-width: 550px;
    margin-top: 10px;
    margin-bottom: 0;
}

/* 방명록 입력 행 (단일 컬럼) */
.gb-input-row--single {
    grid-template-columns: 1fr;
}

/* 방명록 안내 텍스트 */
.notice-text--guestbook {
    margin-bottom: 15px;
}

/* 더 보기 버튼 */
.load-more-btn-spacing {
    margin-top: 2rem;
}

/* 수정 모달 내 modal-info */
.edit-modal-info {
    margin-top: 0;
}

/* 수정 모달 제목 */
.edit-modal-title {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* 수정 모달 폼 */
.edit-modal-form {
    margin-top: 1.5rem;
}

/* 수정 모달 textarea */
.edit-modal-textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--secondary-color);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 1rem;
}

/* 수정 모달 submit 버튼 */
.edit-modal-submit {
    width: 100%;
}

/* =========================================
   Guestbook Styles
   ========================================= */
.guestbook-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.guestbook-form {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-form input,
.guestbook-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 141, 161, 0.3);
}

.guestbook-form textarea {
    resize: vertical;
    min-height: 100px;
}

.guestbook-form .submit-btn {
    align-self: flex-end;
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.guestbook-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guestbook-entry {
    background-color: var(--white);
    padding: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border-left: 4px solid var(--primary-color);
    animation: fadeIn 0.5s ease;
}

.guestbook-entry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.guestbook-entry-name {
    font-weight: 700;
    color: var(--accent-color);
}

.guestbook-entry-date {
    font-size: 0.8rem;
}

.guestbook-entry-message {
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: keep-all;
    /* 단어 단위 줄바꿈 */
    overflow-wrap: break-word;
    /* 긴 단어 강제 줄바꿈 방지 */
}

.gb-input-row {
    display: flex;
    gap: 1rem;
}

.gb-input-row input {
    flex: 1;
}

.guestbook-entry-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.guestbook-action-btn {
    font-size: 0.8rem;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.guestbook-action-btn:hover {
    color: var(--accent-color);
}

.guestbook-action-btn.blind-btn {
    color: #dc3545;
}

.guestbook-action-btn.blind-btn:hover {
    color: #a71d2a;
}

.guestbook-action-btn.unblind-btn {
    color: #28a745;
}

.guestbook-action-btn.unblind-btn:hover {
    color: #1e7e34;
}

.google-btn {
    background-color: #fff;
    color: #555;
    border: 1px solid #ddd;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.google-btn:hover {
    background-color: #f8f9fa !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1) !important;
}

.google-btn img {
    width: 18px;
    height: 18px;
}

.gb-submit-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    align-items: flex-start;
    margin-top: 10px;
}

.submit-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.submit-wrapper .submit-btn {
    width: 100%;
    margin: 0;
    padding: 0.8rem;
}

.gb-deadline-text {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
}

/* =========================================
   Guestbook Focus Notice (Phase 1)
   ========================================= */
.gb-focus-notice {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background-color: #fff5f6;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0 1rem;
    margin: 0;
    position: relative;
    text-align: left;
    /* Ensure left align for list */
}

.gb-focus-notice.show {
    max-height: 300px;
    opacity: 1;
    padding: 1rem;
    margin-bottom: 1rem;
    border-color: var(--secondary-color);
}

.warning-title {
    display: block;
    color: #e03131;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.gb-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gb-notice-list li {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 0.3rem;
    word-break: keep-all;
}

.gb-notice-list .danger-text {
    color: #e03131;
    font-weight: 500;
}

.close-notice-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.2rem;
    color: #888;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    user-select: none;
}

.close-notice-btn:hover {
    color: var(--accent-color);
}

/* =========================================
   Easter Egg: Walking Characters
   ========================================= */
.egg-walker {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    position: absolute;
    z-index: 50;
    pointer-events: none;
}

/* #1: Red Moa character flash on text change */
.char-restore-flash {
    animation: charFlash 0.4s ease;
}

@keyframes charFlash {
    0% {
        color: var(--text-main);
    }

    30% {
        color: var(--accent-color);
        transform: scale(1.3);
    }

    100% {
        color: var(--text-main);
        transform: scale(1);
    }
}

/* #1: Fade-out + collapse for removed characters */
.char-fade-collapse {
    opacity: 0 !important;
    width: 0 !important;
    overflow: hidden;
}

/* #3: Footer walker — clickable for minigame trigger */
.egg-walker.footer-walker {
    pointer-events: auto;
    cursor: pointer;
}

/* =========================================
   Minigame Modal & UI
   ========================================= */
.minigame-modal {
    padding: 1rem;
}

.minigame-wrapper {
    margin: auto;
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeInModal 0.4s ease;
}

/* Score Header */
.minigame-header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 141, 161, 0.25);
}

.minigame-score-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.minigame-score {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 60px;
    text-align: right;
}

/* Canvas Container */
.minigame-canvas-container {
    position: relative;
    width: 100%;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Game player sprite (img overlay for GIF animation) */
#game-player {
    position: absolute;
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    z-index: 5;
    pointer-events: none;
    display: none;
    /* shown when game is active */
}

/* Game Overlay (Start / Game Over screen — card layout below canvas) */
.game-overlay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.game-overlay.hidden-overlay {
    display: none;
}

.game-overlay-content {
    text-align: center;
}

.game-overlay-title {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.game-overlay-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Nickname input in overlay */
.game-nickname-input {
    display: block;
    margin: 0.8rem auto 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: center;
    outline: none;
    width: 180px;
    transition: border-color 0.3s;
}

.game-nickname-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 141, 161, 0.3);
}

.game-submit-btn {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.game-submit-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

/* Leaderboard */
.minigame-footer {
    width: 100%;
}

.minigame-leaderboard {
    background: var(--white);
    border-radius: 15px;
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow);
}

.leaderboard-title {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 0.8rem;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: lb-counter;
}

.leaderboard-list li {
    counter-increment: lb-counter;
    display: flex;
    align-items: center;
    padding: 0.4rem 0.2rem;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 209, 220, 0.3);
}

.leaderboard-list li:last-child {
    border-bottom: none;
}

.leaderboard-list li::before {
    content: counter(lb-counter) ".";
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 28px;
    text-align: right;
    margin-right: 0.6rem;
}

.leaderboard-list li .lb-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-list li .lb-score {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent-color);
    margin-left: 0.5rem;
}

.leaderboard-empty {
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.leaderboard-empty::before {
    content: none !important;
}

/* Close button for minigame modal */
.close-minigame-modal {
    position: fixed;
    top: 15px;
    right: 25px;
    z-index: 1001;
}