/* Tailwind CSS */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 기본 폰트 */
@import url('https://cdn.rawgit.com/moonspam/NanumSquare/master/nanumsquare.css');

/* 제목용 폰트 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&display=swap');

/* 방명록 손글씨 폰트 */
@font-face {
    font-family: 'OngleipParkDahyeon';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2411-3@1.0/Ownglyph_ParkDaHyun.woff2') format('woff2');
    font-weight: normal;
    font-display: swap;
}

/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: 'NanumSquare', 'Apple SD Gothic Neo', sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #fce4ec 50%, #f3e5f5 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
    color: #212529;
}

/* 메인 제목 전용 스타일 */
h1, .hero-title, .invitation-title, .fortune-title, .bible-selection-title {
    font-family: 'Montserrat', 'NanumSquare', sans-serif !important;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* 전체 페이지에 히어로 페이지 폰트 스타일 적용 */
h2, h3, .game-title, .nav-title {
    font-family: 'Montserrat', 'NanumSquare', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* 본문 텍스트 스타일 통일 */
p, .text-base, .game-description, .room-description {
    font-family: 'NanumSquare', 'Apple SD Gothic Neo', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

/* 작은 텍스트 스타일 */
.text-sm, .text-xs, .form-label {
    font-family: 'NanumSquare', 'Apple SD Gothic Neo', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* 버튼 텍스트 스타일 */
.btn {
    font-family: 'NanumSquare', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* 카드 간격 및 여백 개선 */
.game-grid {
    gap: 1.5rem;
}

.game-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

html.dark body {
    background: linear-gradient(180deg, #1a1d23 0%, #2d3748 100%);
    color: #e2e8f0;
}

/* 다크모드 텍스트 가독성 개선 */
html.dark p,
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6,
html.dark span,
html.dark div {
    color: #f3f4f6;
}

html.dark .text-gray-600,
html.dark .text-gray-500,
html.dark .text-gray-400 {
    color: #d1d5db !important;
}

html.dark .hero p,
html.dark .hero h1,
html.dark .hero h2,
html.dark .hero h3 {
    color: #f8fafc !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

html.dark .hero .text-xl {
    color: #f8fafc !important;
}

html.dark .hero .text-2xl {
    color: #818cf8 !important;
}

/* 히어로 페이지 */
.hero {
    position: relative;
    min-height: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    backdrop-filter: none;
}

html.dark .hero {
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.5);
}

/* 히어로 페이지 하단 텍스트 가독성 개선 */
.hero .text-center.py-12 {
    background: rgba(0, 0, 0, 0.3);
    padding: 3rem 2rem !important;
    border-radius: 20px;
    margin: 2rem auto;
    max-width: 90%;
    backdrop-filter: blur(10px);
}

body::before {
    content: none;
}

/* 초대장 페이지 배경 */
.invitation-container {
    background: linear-gradient(135deg, #e3f2fd 0%, #fce4ec 50%, #f3e5f5 100%);
    min-height: 100vh;
}

/* 눈 내리는 애니메이션 */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: white;
    font-size: 1em;
    opacity: 0.8;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* 루돌프 썰매 애니메이션 */
.rudolf-sleigh {
    position: fixed;
    top: 15%;
    left: -100px;
    font-size: 2.5rem;
    z-index: 1000;
    animation: fly 15s linear infinite;
    pointer-events: auto;
    transform: scaleX(-1);
    white-space: nowrap;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rudolf-sleigh.loaded {
    opacity: 1;
}

/* 산타 축복 카드 모달 */
.santa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.santa-blessing-card {
    width: 90%;
    max-width: 600px;
    min-height: 400px;
    background: linear-gradient(135deg, #fff9f0, #ffe8e8);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 30px 90px rgba(196, 69, 105, 0.5),
        0 15px 50px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.santa-card-back {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
}

.santa-hammer {
    font-size: 5rem;
    position: absolute;
    top: -50px;
    transform: rotate(-20deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes hammerStrike {
    0% {
        top: -50px;
        transform: rotate(-20deg);
    }
    40% {
        top: 50%;
        transform: rotate(10deg);
    }
    100% {
        top: -50px;
        transform: rotate(-20deg);
    }
}

.santa-seal {
    font-size: 3rem;
    font-weight: 900;
    color: #ffd700;
    text-align: center;
    line-height: 1.2;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.8),
        2px 2px 4px rgba(139, 69, 19, 0.5);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
}

.santa-card-front {
    animation: sparkleCard 2s ease-in-out infinite;
}

@keyframes sparkleCard {
    0%, 100% {
        box-shadow: 
            0 30px 90px rgba(196, 69, 105, 0.5),
            0 15px 50px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 30px 90px rgba(196, 69, 105, 0.7),
            0 15px 50px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.8);
    }
}

@keyframes cardFlipOut {
    0% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
}

@keyframes cardFlipIn {
    0% {
        transform: rotateY(-90deg) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.santa-card-content {
    text-align: center;
    color: #4a3428;
}

/* 말씀 카드 스타일 */
.bible-card-elegant {
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 182, 193, 0.3), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 240, 245, 0.4), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 228, 225, 0.3), transparent 60%),
        linear-gradient(135deg, 
            #fff5f7 0%,
            #ffe8f0 15%,
            #ffd9eb 30%,
            #ffcce0 45%,
            #ffd9eb 60%,
            #ffe8f0 75%,
            #fff5f7 90%,
            #ffffff 100%
        );
    border-radius: 32px;
    padding: 2rem 1.5rem;
    box-shadow: 
        0 35px 100px rgba(255, 105, 180, 0.3),
        0 20px 60px rgba(255, 192, 203, 0.4),
        inset 0 3px 0 rgba(255, 255, 255, 1),
        inset 0 0 80px rgba(255, 240, 245, 0.8);
    position: relative;
    overflow: hidden;
    border: 5px solid transparent;
    background-clip: padding-box;
    color: #3a2818 !important;
    width: 100%;
    max-width: 100%;
}

/* 키라키라 효과 제거 - 깔끔한 디자인 */

.bible-card-decoration-top,
.bible-card-decoration-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.decoration-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 215, 0, 0.5) 50%, 
        transparent);
}

.decoration-star,
.decoration-cross {
    font-size: 1.5rem;
    color: #ffd700;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

.bible-card-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.bible-year-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #4a3428;
    font-size: 1rem;
    font-weight: 800;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.bible-card-title {
    font-size: 2rem;
    font-weight: 700;
    color: #c44569;
    margin: 0;
    text-shadow: 0 2px 10px rgba(196, 69, 105, 0.2);
}

.bible-card-body {
    position: relative;
    z-index: 1;
}

.bible-card-message {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #4a3428;
    margin-bottom: 2rem;
    text-align: center;
}

.bible-card-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #c44569;
    text-shadow: 0 1px 3px rgba(196, 69, 105, 0.2);
}

/* 다크모드에서도 말씀카드는 밝게 유지 */
html.dark .bible-card-elegant,
html.dark .bible-card-elegant * {
    color: inherit !important;
}

html.dark .bible-card-message {
    color: #4a3428 !important;
}

html.dark .bible-card-name {
    color: #c44569 !important;
}

html.dark .bible-verse-text {
    color: #3a2818 !important;
}

html.dark .bible-verse-ref {
    color: #8b7355 !important;
}

.bible-verse-box {
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95), 
            rgba(255, 250, 240, 0.95)
        ),
        linear-gradient(45deg, 
            transparent 48%, 
            rgba(255, 215, 0, 0.05) 49%, 
            rgba(255, 215, 0, 0.05) 51%, 
            transparent 52%
        );
    background-size: 100% 100%, 20px 20px;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    border: 4px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.12),
        0 5px 15px rgba(196, 69, 105, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 0 30px rgba(255, 250, 240, 0.6);
    position: relative;
    margin: 2.5rem 0;
}

.bible-verse-box::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700, #ffed4e, #ffd700);
    border-radius: 24px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.6;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.2);
    }
}

.verse-quote-mark {
    font-size: 5rem;
    font-family: Georgia, serif;
    color: rgba(255, 215, 0, 0.4);
    line-height: 0;
    position: absolute;
    top: 15px;
    left: 10px;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
    animation: quotePulse 4s ease-in-out infinite;
}

.verse-quote-end {
    top: auto;
    bottom: -15px;
    left: auto;
    right: 10px;
    animation-delay: 2s;
}

@keyframes quotePulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.bible-verse-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #3a2818;
    line-height: 1.9;
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(196, 69, 105, 0.1);
    letter-spacing: -0.01em;
}

.bible-verse-ref {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b6f47;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 215, 0, 0.2);
}

.ref-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.4));
}

.bible-card-footer {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.bible-watermark {
    font-size: 0.85rem;
    color: rgba(74, 52, 40, 0.4);
    font-weight: 500;
    letter-spacing: 0.05em;
}

@keyframes candyDrop {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(150px) rotate(180deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

@keyframes candyCatch {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

@keyframes candyFadeOut {
    0% {
        opacity: 0.9;
    }
    100% {
        opacity: 0;
    }
}

@keyframes cabinGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
        transform: scale(1.05);
    }
}

@keyframes cabinDoorOpen {
    0% {
        transform: scale(1) rotateY(0deg);
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.2) rotateY(-15deg);
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
    }
    100% {
        transform: scale(1.3) rotateY(-30deg);
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 1));
        opacity: 0.8;
    }
}

@keyframes snowFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(100px) rotate(360deg);
        opacity: 0;
    }
}

.village-button-container:hover .village-button {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.village-button-container:active .village-button {
    transform: translateY(-2px) scale(0.98);
}

/* 눈송이 담기 게임 스타일 */
.snow-basket-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #87ceeb 0%, #e0f6ff 50%, #b0e0e6 100%);
    position: relative;
    overflow: hidden;
}

.snow-basket-game {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.snow-basket-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.snow-basket-description {
    color: #34495e;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.snow-basket-start,
.snow-basket-playing,
.snow-basket-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.snow-basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(52, 73, 94, 0.9);
    border-radius: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.snow-basket-timer {
    font-size: 2rem;
    font-weight: 800;
    color: #e74c3c;
    text-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
}

.snow-basket-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
}

.snow-basket-game-area {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(180deg, #e0f6ff 0%, #b0e0e6 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

@keyframes snowflakeFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(700px) rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes snowflakeCatch {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0) translateY(-50px);
        opacity: 0;
    }
}

.snow-basket-final-score {
    margin: 2rem 0;
}

.snow-basket-message {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9c4 0%, #ffccbc 100%);
    border-radius: 16px;
    border-left: 4px solid #667eea;
}

/* 눈송이 담기 게임 스타일 */
.snow-basket-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #87ceeb 0%, #e0f6ff 50%, #b0e0e6 100%);
    position: relative;
    overflow: hidden;
}

.snow-basket-game {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.snow-basket-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.snow-basket-description {
    color: #34495e;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.snow-basket-start,
.snow-basket-playing,
.snow-basket-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.snow-basket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(52, 73, 94, 0.9);
    border-radius: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.snow-basket-timer {
    font-size: 2rem;
    font-weight: 800;
    color: #e74c3c;
    text-shadow: 0 2px 8px rgba(231, 76, 60, 0.5);
}

.snow-basket-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #27ae60;
}

.snow-basket-game-area {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(180deg, #e0f6ff 0%, #b0e0e6 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

@keyframes snowflakeFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(700px) rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes snowflakeCatch {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0) translateY(-50px);
        opacity: 0;
    }
}

.snow-basket-final-score {
    margin: 2rem 0;
}

.snow-basket-message {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9c4 0%, #ffccbc 100%);
    border-radius: 16px;
    border-left: 4px solid #667eea;
}

@keyframes fly {
    0% {
        left: -100px;
        transform: scaleX(-1) translateY(0);
    }
    50% {
        transform: scaleX(-1) translateY(-20px);
    }
    100% {
        left: calc(100% + 100px);
        transform: scaleX(-1) translateY(0);
    }
}

/* 크리스마스 장식 애니메이션 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* 효과음 토글 버튼 */
.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.sound-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.6);
}

.sound-toggle.muted {
    background: linear-gradient(135deg, #d3d3d3 0%, #b0b0b0 100%);
    opacity: 0.6;
}

/* 메인 앱 컨테이너 */
#app {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* 파스텔 카드 스타일 */
.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
    animation: cardEntrance 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.3s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.15),
        0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.card:active {
    transform: translateY(-2px) scale(0.99);
    transition: all 0.1s ease;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

/* 버튼 스타일 */
.btn {
    padding: 16px 36px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 48px; /* 모바일 터치 최소 크기 */
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.5);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: #667eea;
    transition: all 0.3s ease;
}

html.dark .btn-outline {
    color: #a78bfa;
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

html.dark .btn-outline:hover {
    background: rgba(167, 139, 250, 0.1);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #56CCF2 0%, #2F80ED 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.5);
}

.btn-success:active {
    transform: translateY(-1px) scale(0.98);
}

/* 입력 필드 스타일 */
.input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05rem;
    border: 3px solid #e8e8e8;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.input::placeholder {
    color: #aaa;
    font-weight: 500;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.w-full {
    width: 100%;
}

/* 초대장 소개 페이지 */
.invitation-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
}

.invitation-cover {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    text-align: center;
    padding: 2.5rem 2rem;
    z-index: 20;
}

html.dark .invitation-cover {
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
}

.invitation-cover.active {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.invitation-cover.closing {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
}

.cover-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cover-content p {
    color: #6b7280;
    margin-bottom: 2rem;
}

html.dark .cover-content p {
    color: rgba(255, 255, 255, 0.75);
}

.cover-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
}

.invitation-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 32px;
    padding: 3rem 2rem;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    animation: cardEntrance 0.8s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.invitation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.invitation-card:hover {
    transform: translateY(-8px) rotateX(1deg) scale(1.01);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.25),
        0 12px 48px rgba(0, 0, 0, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.invitation-card:hover::before {
    left: 100%;
}

.invitation-header {
    margin-bottom: 2rem;
}

.invitation-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.invitation-content {
    text-align: left;
    line-height: 2;
    margin-bottom: 2.5rem;
}

.invitation-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.invitation-text.highlight {
    font-weight: 600;
    color: #667eea;
    text-align: center;
    font-size: 1.2rem;
    margin: 2rem 0;
}

.invitation-text.sparkle {
    text-align: center;
    font-size: 1.15rem;
    color: #764ba2;
    font-weight: 500;
    margin-top: 1.5rem;
}

.invitation-footer {
    margin-top: 2.5rem;
}

.invitation-btn {
    font-size: 1.3rem;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.invitation-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

/* 로그인/회원가입 페이지 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    max-width: 450px;
    width: 100%;
}

.auth-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 2rem;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #fcc;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

/* 메인 히어로 섹션 */
.hero {
    text-align: center;
    padding: 4rem 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 2rem;
}

/* 파티 정보 그리드 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    animation: cardEntrance 0.6s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent);
    transition: left 0.5s ease;
}

.info-card:hover {
    transform: translateY(-10px) rotateX(2deg) scale(1.05);
    box-shadow: 
        0 16px 48px rgba(102, 126, 234, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.info-card:hover::before {
    left: 100%;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }
.info-card:nth-child(5) { animation-delay: 0.5s; }

.info-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.info-content {
    color: #666;
    line-height: 1.6;
}

/* 다크모드: info-card 가독성 개선 */
html.dark .info-card {
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
}

html.dark .info-title {
    color: #f8fafc !important;
}

html.dark .info-content {
    color: #e2e8f0 !important;
}

/* 마을 화면 */
.village-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.village-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 3rem;
}

.village-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.house {
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.house.modern-house {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(250, 250, 255, 0.98) 100%) !important;
    backdrop-filter: blur(10px);
}

/* 귀여운 파스텔톤 배경 - 투명도 증가 */
.house.pastel-mint {
    background: linear-gradient(135deg, 
        rgba(189, 236, 182, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-pink {
    background: linear-gradient(135deg, 
        rgba(255, 192, 203, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-lavender {
    background: linear-gradient(135deg, 
        rgba(230, 230, 250, 0.75) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-peach {
    background: linear-gradient(135deg, 
        rgba(255, 218, 185, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-blue {
    background: linear-gradient(135deg, 
        rgba(176, 224, 230, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-coral {
    background: linear-gradient(135deg, 
        rgba(255, 127, 80, 0.6) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-yellow {
    background: linear-gradient(135deg, 
        rgba(255, 255, 224, 0.75) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-purple {
    background: linear-gradient(135deg, 
        rgba(221, 160, 221, 0.65) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-rose {
    background: linear-gradient(135deg, 
        rgba(255, 228, 225, 0.75) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-sky {
    background: linear-gradient(135deg, 
        rgba(135, 206, 250, 0.65) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-cream {
    background: linear-gradient(135deg, 
        rgba(255, 253, 208, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house.pastel-teal {
    background: linear-gradient(135deg, 
        rgba(175, 238, 238, 0.7) 0%, 
        rgba(255, 255, 255, 0.98) 100%) !important;
}

.house::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(102, 126, 234, 0.6) 0%, 
        rgba(118, 75, 162, 0.6) 50%, 
        rgba(240, 147, 251, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.house:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 32px rgba(102, 126, 234, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.house:hover::before {
    opacity: 1;
}

.house-decoration {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
}

.house-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.house-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

/* 개인 방 */
.room-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.room-themed {
    min-height: 100vh;
    background: white;
    background-attachment: fixed;
}

.room-header {
    text-align: center;
    margin-bottom: 2rem;
}

.room-title {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.room-description {
    color: #666;
    line-height: 1.6;
}

.room-scene-wrapper {
    position: relative;
    transform-style: preserve-3d;
}

.room-scene {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 600px;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 0 50px rgba(255, 255, 255, 0.3);
    overflow: visible;
    border: 3px solid #922b21;
    border-top: 3px solid #922b21;
    border-style: solid;
    margin-top: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(192, 57, 43, 0.15) 2px,
            rgba(192, 57, 43, 0.15) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(192, 57, 43, 0.1) 50px,
            rgba(192, 57, 43, 0.1) 100px
        );
    transform-style: preserve-3d;
}

.room-roof {
    transform-style: preserve-3d;
}

@keyframes smoke {
    0% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        opacity: 0.3;
        transform: translateX(-50%) translateY(-5px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px) scale(1.5);
    }
}

@keyframes smokeUp {
    0% {
        opacity: 0.7;
        transform: translateX(50%) translateY(0) scale(1);
    }
    50% {
        opacity: 0.4;
        transform: translateX(calc(50% + 20px)) translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(calc(50% + 40px)) translateY(-40px) scale(1.5);
    }
}

.note {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #fff9c4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.note-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.note:hover {
    transform: scale(1.2) rotate(10deg);
}

.note-form {
    max-width: 600px;
    margin: 2rem auto;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.all-notes-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 255, 0.98));
    border-radius: 18px;
    padding: 1.5rem;
    border: 1px solid rgba(102, 126, 234, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.all-notes-wrapper.exporting {
    opacity: 0.9;
    filter: saturate(1.05);
}

.notes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.notes-modal-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.btn-export-notes {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-export-notes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(118, 75, 162, 0.4);
}

.note-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    animation: cardEntrance 0.5s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.4s ease;
}

.note-card:hover {
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-6px) rotateX(1deg) scale(1.02);
    border-color: rgba(102, 126, 234, 0.3);
}

.note-card:hover::before {
    left: 100%;
}

@media (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        max-width: 95%;
    }
}

.modal-close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* 게임 섹션 */
.game-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    animation: cardBounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

@keyframes cardBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    60% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.game-card:hover {
    transform: translateY(-10px) rotateX(1deg) scale(1.01);
    box-shadow: 
        0 20px 60px rgba(102, 126, 234, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.game-card:hover::before {
    left: 100%;
}

.game-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

/* 다크모드: 게임 섹션 가독성 개선 */
html.dark .game-card {
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
}

html.dark .game-title {
    color: #818cf8 !important;
}

html.dark .game-card p {
    color: #e2e8f0 !important;
}

html.dark .game-section h2 {
    color: #818cf8 !important;
}

html.dark .game-section p {
    color: #d1d5db !important;
}

/* 다크모드: 모든 카드 스타일 */
html.dark .card {
    background: rgba(30, 41, 59, 0.95);
    border: 2px solid rgba(71, 85, 105, 0.5);
    color: #f8fafc;
}

html.dark .card h2,
html.dark .card h3,
html.dark .card h4,
html.dark .card p,
html.dark .card label {
    color: #f8fafc !important;
}

/* 다크모드: 입력 필드 */
html.dark .input,
html.dark input[type="text"],
html.dark input[type="number"],
html.dark textarea,
html.dark select {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(71, 85, 105, 0.5);
    color: #f8fafc;
}

html.dark .input::placeholder {
    color: #94a3b8;
}

/* 다크모드: 네비게이션 바 */
html.dark .nav-bar {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 2px solid rgba(71, 85, 105, 0.5);
}

html.dark .nav-title {
    color: #f8fafc !important;
}

/* 다크모드: 인증 페이지 */
html.dark .auth-card {
    background: rgba(30, 41, 59, 0.95);
    border: 2px solid rgba(71, 85, 105, 0.5);
}

html.dark .auth-title {
    color: #818cf8 !important;
}

html.dark .auth-subtitle {
    color: #d1d5db !important;
}

html.dark .form-label {
    color: #f8fafc !important;
}

/* 다크모드: 마을/빌리지 */
html.dark .village {
    color: #f8fafc;
}

html.dark .village h1,
html.dark .village h2 {
    color: #f8fafc !important;
}

html.dark .house {
    background: rgba(30, 41, 59, 0.9);
    border: 3px solid rgba(71, 85, 105, 0.5);
}

html.dark .house-name {
    color: #f8fafc !important;
}

/* 다크모드: 갤러리 */
html.dark .gallery-grid {
    color: #f8fafc;
}

html.dark .photo-card {
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid rgba(71, 85, 105, 0.5);
}

html.dark .photo-card p {
    color: #d1d5db !important;
}

/* 다크모드: 텔레스트레이션 */
html.dark .telestration-container {
    color: #f8fafc;
}

html.dark .player-card,
html.dark .player-order-item {
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid rgba(71, 85, 105, 0.5);
    color: #f8fafc !important;
}

html.dark #drawingCanvas {
    background: rgba(248, 250, 252, 0.95);
}

html.dark #textInput {
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(71, 85, 105, 0.5);
    color: #f8fafc;
}

/* 다크모드: 버튼 보조 스타일 */
html.dark .btn-secondary {
    background: rgba(71, 85, 105, 0.8);
    color: #f8fafc;
}

html.dark .btn-secondary:hover {
    background: rgba(71, 85, 105, 1);
}

/* 다크모드: 에러/경고 메시지 */
html.dark .error-message {
    color: #fca5a5 !important;
}

/* 다크모드: 테이블 */
html.dark table {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
}

html.dark th {
    background: rgba(71, 85, 105, 0.5);
    color: #f8fafc !important;
}

html.dark td {
    border-color: rgba(71, 85, 105, 0.3);
    color: #f8fafc !important;
}

/* 다크모드: inline style 배경을 덮어쓰기 (기본) */
html.dark .card[style*="background"] {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 2px solid rgba(71, 85, 105, 0.5);
}

html.dark .card[style*="background"] * {
    color: #f8fafc !important;
}

/* 다크모드: 방명록 카드는 배경 유지하고 글씨만 어둡게 */
html.dark .card[style*="fff9c4"],
html.dark .card[style*="ffccbc"] {
    background: linear-gradient(135deg, #fff9c4 0%, #ffccbc 100%) !important;
    border: 2px solid rgba(255, 183, 77, 0.5);
}

html.dark .card[style*="fff9c4"] *,
html.dark .card[style*="ffccbc"] * {
    color: #3e2723 !important;
}

html.dark .card[style*="fff9c4"] .input,
html.dark .card[style*="ffccbc"] .input {
    background: rgba(255, 255, 255, 0.95);
    color: #3e2723 !important;
    border: 2px solid rgba(139, 69, 19, 0.3);
}

html.dark .card[style*="fff9c4"] .input::placeholder,
html.dark .card[style*="ffccbc"] .input::placeholder {
    color: #8d6e63 !important;
}

html.dark .card[style*="fff9c4"] .stamp-option,
html.dark .card[style*="ffccbc"] .stamp-option {
    background: white !important;
    border: 2px solid #ff9800 !important;
}

html.dark .card[style*="fff9c4"] .stamp-option.selected,
html.dark .card[style*="ffccbc"] .stamp-option.selected {
    background: #ffe0b2 !important;
    border-color: #ff6f00 !important;
    transform: scale(1.1);
}

/* 다크모드: 방명록 목록 항목 */
html.dark .guestbook-entry {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%) !important;
    border-left: 4px solid #667eea !important;
}

html.dark .guestbook-entry strong {
    color: #667eea !important;
}

html.dark .guestbook-entry p {
    color: #1a1a1a !important;
}

html.dark .guestbook-entry .text-sm {
    color: #666 !important;
}

html.dark .guestbook-entry .stamps-display span {
    opacity: 0.9 !important;
}

/* 다크모드: 리스트 아이템 */
html.dark ul li,
html.dark ol li {
    color: #f8fafc !important;
}

html.dark .list-disc li::marker,
html.dark .list-inside li::marker {
    color: #818cf8 !important;
}

/* 다크모드: 제목에 inline color가 있는 경우 */
html.dark h1[style*="color"],
html.dark h2[style*="color"],
html.dark h3[style*="color"],
html.dark h4[style*="color"] {
    color: #818cf8 !important;
}

/* 다크모드: 선물 매칭 결과 - 예쁜 파스텔 그라데이션 유지 */
html.dark #giftMatchingList .card {
    /* 기존 inline style의 그라데이션 유지하되 투명도만 조정 */
    opacity: 0.95;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

html.dark #giftMatchingList .card .text-xl {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

/* 다크모드: 텍스트 크기 클래스 */
html.dark .text-xl,
html.dark .text-lg,
html.dark .text-sm {
    color: #f8fafc !important;
}

html.dark .text-gray-600,
html.dark .text-center.text-gray-600 {
    color: #d1d5db !important;
}

/* 다크모드: 방명록 폼 */
html.dark #guestbookForm label {
    color: #f8fafc !important;
}

html.dark #guestbookForm .stamp-grid {
    background: rgba(30, 41, 59, 0.5);
}

/* 다크모드: 갤러리 및 퍼즐 이미지 컨테이너 */
html.dark .gallery-grid,
html.dark .puzzle-container {
    background: transparent;
}

html.dark .photo-card img,
html.dark .puzzle-item img {
    border: 2px solid rgba(71, 85, 105, 0.5);
}

/* 다크모드: 사진 placeholder */
html.dark .photo-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%) !important;
    color: #f8fafc !important;
}

html.dark .photo-placeholder .text-lg {
    color: #f8fafc !important;
}

/* 다크모드: 폰트 굵기 클래스 */
html.dark .font-bold {
    color: #f8fafc !important;
}

/* 다크모드: small 태그 */
html.dark small,
html.dark .text-sm {
    color: #d1d5db !important;
}

/* 다크모드: space-y 컨테이너 내부 요소 */
html.dark .space-y-2 > *,
html.dark .space-y-3 > * {
    color: #f8fafc !important;
}

/* 다크모드: 금색 광택 제목 효과 */
html.dark .hero-title,
html.dark .invitation-title {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 25%, #ffd700 50%, #ffb700 75%, #ffd700 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
    position: relative;
}

html.dark .cover-content h1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 25%, #ffd700 50%, #ffb700 75%, #ffd700 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 40px rgba(255, 215, 0, 0.3));
}

html.dark .envelope-card p[style*="font-size: 1.4rem"] {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 25%, #ffd700 50%, #ffb700 75%, #ffd700 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
}

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

/* 캔버스 */
.canvas-container {
    margin: 2rem 0;
    text-align: center;
}

#drawCanvas {
    border: 3px solid #667eea;
    border-radius: 12px;
    cursor: crosshair;
    touch-action: none;
    max-width: 100%;
}

.canvas-tools {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-btn:hover,
.color-btn.active {
    transform: scale(1.2);
    border-color: #333;
}

/* 타이머 */
.timer {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    color: #667eea;
    margin: 2rem 0;
}

.timer.warning {
    color: #f5576c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* 드래그 앤 드롭 */
.puzzle-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
}

.puzzle-item {
    width: 300px;
    height: 300px;
    background: #e0e0e0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.puzzle-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.puzzle-item:active {
    cursor: grabbing;
}

.puzzle-item.dragging {
    opacity: 0.5;
}

.puzzle-item.drag-over {
    border: 3px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.puzzle-item img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* 컨페티 애니메이션 */
.confetti {
    position: fixed;
    width: 12px;
    height: 12px;
    background: #f093fb;
    border-radius: 50%;
    z-index: 3000;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* 네비게이션 */
.nav-bar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-weight: 700;
    color: #667eea;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    /* 초대장 페이지 모바일 */
    .invitation-container {
        padding: 1rem 0.75rem;
    }
    
    .invitation-card {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }
    
    .invitation-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .invitation-text {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.2rem;
    }
    
    .invitation-text.highlight {
        font-size: 1.1rem;
        margin: 1.5rem 0;
    }
    
    .invitation-text.sparkle {
        font-size: 1.05rem;
    }
    
    .invitation-btn {
        font-size: 1.1rem;
        padding: 1rem 2rem;
        width: 100%;
    }
    
    /* 로그인 페이지 모바일 */
    .auth-container {
        padding: 1rem 0.75rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    /* 히어로 페이지 모바일 */
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .village-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    .house {
        padding: 1.5rem 1rem;
    }
    
    .house-icon {
        font-size: 3rem;
    }
    
.room-scene {
    height: 500px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
    
    .puzzle-item {
        width: 150px;
        height: 150px;
    }
    
    .puzzle-container {
        gap: 0.75rem;
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-title {
        font-size: 1rem;
    }
    
    .nav-buttons .btn-secondary {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
    
    .input {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .photo-delete-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        top: 6px;
        right: 6px;
    }
    
    .sound-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .invitation-title {
        font-size: 1.5rem;
    }
    
    .invitation-text {
        font-size: 0.95rem;
    }
    
    .auth-title {
        font-size: 1.4rem;
    }
    
    .village-grid {
        grid-template-columns: 1fr;
    }
    
    .house {
        padding: 1.2rem 0.8rem;
    }
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 사진 갤러리 스타일 */
.photo-card {
    position: relative;
}

.photo-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.photo-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.photo-delete-btn:hover {
    background: rgba(255, 77, 77, 0.9);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

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

/* 텔레스트레이션 관련 스타일 */
.player-order-item {
    transition: all 0.2s ease;
}

.player-order-item.drag-over {
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.player-order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0;
    bottom: -1rem;
    width: 2px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-number {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    z-index: 10;
}

/* 숨김 */
.hidden {
    display: none !important;
}

/* 페이드 인 애니메이션 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 편지봉투 애니메이션 */
.envelope-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, 
            rgba(255, 250, 245, 0.98) 0%,
            rgba(255, 240, 245, 0.98) 25%,
            rgba(250, 235, 245, 0.98) 50%,
            rgba(255, 240, 250, 0.98) 75%,
            rgba(255, 250, 245, 0.98) 100%
        );
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in-bg 0.6s ease-in;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 182, 193, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(221, 160, 221, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 192, 203, 0.1) 0%, transparent 60%);
    animation: bgPulse 10s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.envelope-animation.expanding {
    animation: fade-out-envelope 0.5s ease-out forwards;
}

.envelope {
    width: 380px;
    height: 280px;
    border-radius: 14px;
    position: relative;
    box-shadow: 
        0 35px 90px rgba(0, 0, 0, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(255, 255, 255, 0.4), transparent 50%),
        linear-gradient(145deg, #f8f5f0 0%, #e8e4dc 100%);
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.envelope-animation.expanding .envelope {
    animation: envelope-shrink-and-fade 0.5s ease-out forwards;
}

@keyframes fade-in-bg {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.envelope::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: 
        radial-gradient(ellipse at 50% 90%, rgba(255, 255, 255, 0.2), transparent 50%),
        linear-gradient(145deg, #d4c9bd 0%, #bdb3a7 100%);
    clip-path: polygon(0 0, 50% 85%, 100% 0);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    transform-origin: top;
    animation: open-flap 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.6s;
    z-index: 3;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wax-seal {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 35% 35%, #d4516f, transparent 80%),
        radial-gradient(circle at 30% 30%, #c44569, #89253e);
    color: #fff5f5;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 10px rgba(196, 69, 105, 0.4));
}

.envelope.entering {
    animation: envelope-intro 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes envelope-intro {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.9) rotateX(10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.envelope-body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background: linear-gradient(145deg, #ebe5db 0%, #d9d0c4 100%);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.12);
    z-index: 1;
}

.envelope-body::before,
.envelope-body::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(150deg, transparent 40%, rgba(0, 0, 0, 0.05) 60%);
}

.envelope-body::before {
    left: 0;
    border-bottom-left-radius: 12px;
}

.envelope-body::after {
    right: 0;
    border-bottom-right-radius: 12px;
}

.envelope-fold {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: rgba(0, 0, 0, 0.08);
    z-index: 1;
}

.envelope-stamp {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 64px;
    height: 64px;
    border: 2px dashed rgba(139, 69, 19, 0.3);
    border-radius: 4px;
    background: 
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5), transparent 70%),
        linear-gradient(135deg, #d4af37, #aa8b2e);
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.2),
        inset 0 1px 3px rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.envelope-stamp small {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.envelope-address {
    position: absolute;
    left: 28px;
    top: 32px;
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.envelope-address span {
    display: block;
    height: 6px;
    width: 80%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 999px;
}

.envelope-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 88%;
    height: 78%;
    background: 
        /* 부드러운 빛 효과 */
        radial-gradient(ellipse at 20% 20%, rgba(255, 250, 245, 0.95), transparent 45%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 245, 230, 0.9), transparent 45%),
        /* 은은한 골드 포인트 */
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.03), transparent 60%),
        /* 고급스러운 크림 배경 */
        linear-gradient(135deg, #fffef9 0%, #fff9f0 30%, #fff5e8 60%, #fff9f0 100%);
    border-radius: 6px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 40px rgba(255, 250, 240, 0.6);
    transform: translate(-50%, -50%) scale(0.5) translateY(30px);
    animation: pull-out-card 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 1.9s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    font-weight: 600;
    color: #4a3428;
    text-align: center;
    padding: 2.8rem 2.4rem;
    opacity: 0;
    border: 1px solid rgba(139, 69, 19, 0.15);
    z-index: 4;
    position: relative;
    overflow: hidden;
    line-height: 1.7;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
}

.envelope-card p {
    margin: 0;
    position: relative;
    z-index: 2;
}

.envelope-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.7) 0%, 
        rgba(255, 255, 255, 0.4) 40%, 
        rgba(255, 250, 240, 0.2) 70%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
    filter: blur(0.5px);
}

.envelope-card::after {
    content: '✨';
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 2rem;
    opacity: 0;
    animation: sparkleDelayed 3s ease-in-out 1s infinite;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

@keyframes sparkleDelayed {
    0%, 20% {
        opacity: 0;
        transform: scale(0.8) rotate(0deg);
    }
    40% {
        opacity: 0.9;
        transform: scale(1.1) rotate(10deg);
    }
    60% {
        opacity: 0.7;
        transform: scale(1) rotate(-5deg);
    }
    80%, 100% {
        opacity: 0;
        transform: scale(0.8) rotate(0deg);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(15deg);
    }
}

@keyframes scale-in {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes open-flap {
    0% { 
        transform: rotateX(0deg); 
    }
    70% {
        transform: rotateX(-175deg);
    }
    100% { 
        transform: rotateX(-180deg); 
    }
}

@keyframes pull-out-card {
    0% { 
        transform: translate(-50%, -50%) scale(0.5) translateY(30px); 
        opacity: 0; 
    }
    50% {
        transform: translate(-50%, -50%) scale(0.9) translateY(5px);
        opacity: 0.7;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.08) translateY(-5px);
        opacity: 0.95;
    }
    100% { 
        transform: translate(-50%, -50%) scale(1) translateY(0); 
        opacity: 1; 
    }
}

@keyframes fade-out-envelope {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes envelope-shrink-and-fade {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(0.85);
        opacity: 0;
    }
}

@keyframes old-fade-out-envelope {
    0% { opacity: 1; pointer-events: all; }
    100% { opacity: 0; pointer-events: none; display: none; }
}

.envelope-animation.opening .envelope-flap {
    animation: open-flap 1.5s ease-out forwards;
}

/* ==========================================
   WELCOME 2026 페이지 스타일
   ========================================== */
.welcome-2026-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.welcome-header {
    text-align: center;
    margin-bottom: 4rem;
}

.welcome-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.year-label {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #667eea;
    text-transform: uppercase;
}

.year-number {
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: #666;
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.welcome-card {
    background: white;
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.1);
    border: 2px solid transparent;
}

.welcome-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.card-fortune {
    background: linear-gradient(135deg, #fff9f0 0%, #ffe8f0 100%);
}

.card-wishes {
    background: linear-gradient(135deg, #f0f9ff 0%, #f5f0ff 100%);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.card-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.card-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.welcome-card:hover .card-button {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================
   행운의 카드 뽑기 스타일
   ========================================== */
.fortune-card-container {
    min-height: auto;
    background: transparent;
    padding: 1.5rem 2rem 2rem;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fortune-card-container::before {
    content: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.snow-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

#tsparticles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    animation: fall linear infinite;
    user-select: none;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

.fortune-header {
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

.fortune-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.5));
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 4px 35px rgba(255, 215, 0, 0.9));
    }
}

.fortune-subtitle {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 
        0 2px 15px rgba(138, 43, 226, 0.6),
        0 0 30px rgba(138, 43, 226, 0.4);
}

.fortune-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    margin-bottom: 1rem;
}

.btn-shuffle {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600;
    margin-top: 1rem;
}

.btn-shuffle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-shuffle:active {
    transform: translateY(0);
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
    padding-bottom: 0.5rem;
}

.fortune-card {
    width: 140px;
    height: 220px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.7) rotateY(-15deg);
    }
    60% {
        transform: translateY(-10px) scale(1.05) rotateY(5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fortune-card:hover {
    transform: scale(1.15) translateY(-20px);
    z-index: 10;
    filter: drop-shadow(0 15px 35px rgba(138, 43, 226, 0.6)) 
            drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
}

.fortune-card:hover::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, 
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent,
        rgba(138, 43, 226, 0.3),
        transparent
    );
    border-radius: 18px;
    animation: glitterRotate 3s linear infinite;
    z-index: -1;
}

@keyframes glitterRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fortune-card:hover .card-hover-label {
    opacity: 1;
    transform: translateY(-10px);
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    transform: rotateY(180deg); /* 초기 상태: 뒷면이 보이도록 */
}

.fortune-card.flipping .card-inner {
    transform: rotateY(0deg); /* 플립 시 정면이 보이도록 */
}

.card-front {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transform: rotateY(0deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    overflow: hidden;
}

.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    /* 배경 이미지는 인라인 스타일로 지정됨 (card1.png, card2.png, card3.png) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    box-shadow: 
        0 20px 50px rgba(255, 105, 180, 0.5),
        0 10px 30px rgba(255, 192, 203, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
    border: 5px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-back::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        #ff69b4 0%,
        #ffb6c1 5%,
        #ffd700 10%,
        #ffec8b 15%,
        #98fb98 20%,
        #87ceeb 25%,
        #b0e0e6 30%,
        #dda0dd 35%,
        #ff69b4 40%,
        #ffb6c1 45%,
        #ffd700 50%,
        #ffec8b 55%,
        #98fb98 60%,
        #87ceeb 65%,
        #b0e0e6 70%,
        #dda0dd 75%,
        #ff69b4 80%,
        #ffb6c1 85%,
        #ffd700 90%,
        #ffec8b 95%,
        #ff69b4 100%);
    background-size: 400% 400%;
    border-radius: 16px;
    z-index: -1;
    animation: rainbowFlow 6s linear infinite;
}

@keyframes rainbowFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.card-back-pattern {
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 215, 0, 0.15), transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(138, 43, 226, 0.1), transparent 40%),
        repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255, 215, 0, 0.08) 8px, rgba(255, 215, 0, 0.08) 16px),
        repeating-linear-gradient(-45deg, transparent, transparent 8px, rgba(255, 165, 0, 0.06) 8px, rgba(255, 165, 0, 0.06) 16px);
    position: relative;
}

.card-back-pattern::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.4;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.card-back-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    background: 
        radial-gradient(ellipse at center, 
            rgba(255, 215, 0, 0.4) 0%, 
            rgba(255, 165, 0, 0.2) 30%, 
            transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
    filter: blur(10px);
}

@keyframes pulseGlow {
    0%, 100% { 
        opacity: 0.4; 
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.card-hover-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 카드 결과 페이지 */
.card-result-container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 1rem;
}

.result-card-display {
    margin-bottom: 2rem;
}

.result-card {
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.4),
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: cardReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 4s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: scale(0.7) rotateY(-30deg) translateY(50px);
    }
    60% {
        transform: scale(1.05) rotateY(5deg) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateY(0);
    }
}

.result-card-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.result-card-user-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: fadeInDown 0.8s ease;
}

.user-name-highlight {
    font-weight: 800;
    font-size: 1.3rem;
    color: #ffd700;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.result-card-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.5px;
}

.result-card-year-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.result-card-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.result-card-body {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

/* 컴팩트한 헤더 스타일 */
.result-card-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.result-card-user-badge-compact {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.result-card-year-badge-compact {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
}

/* 큰 이미지 스타일 */
.result-card-image-wrapper-large {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.result-card-image-large {
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.result-card-image-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.result-card-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-card-message {
    font-size: 1.1rem;
    line-height: 1.8;
    color: white;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.result-card-footer {
    text-align: center;
    position: relative;
    z-index: 2;
}

.result-card-watermark {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.result-card-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.pattern-ribbons,
.pattern-arrows,
.pattern-snowflakes,
.pattern-ornaments,
.pattern-coins,
.pattern-waves,
.pattern-sparkles {
    position: absolute;
    font-size: 2rem;
    opacity: 0.2;
    animation: patternFloat 3s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.pattern-ribbons {
    top: 10%;
    right: 10%;
}

.pattern-arrows {
    bottom: 10%;
    left: 10%;
}

.pattern-snowflakes {
    top: 20%;
    left: 15%;
}

.pattern-ornaments {
    bottom: 15%;
    right: 15%;
}

.pattern-coins {
    top: 30%;
    right: 20%;
}

.pattern-waves {
    bottom: 20%;
    left: 20%;
}

.pattern-sparkles {
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.result-actions {
    text-align: center;
}

.result-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   모바일 반응형 최적화
   ========================================== */
@media (max-width: 768px) {
    /* 전체 컨테이너 - 모바일 최적화 (전체 너비 사용) */
    .game-section {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 0.5rem !important;
        margin: 0 !important;
    }
    
    .game-card,
    .invitation-container,
    .welcome-2026-container,
    .fortune-card-container,
    .card-result-container {
        padding: 0.5rem !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* 카드 너비 최대화 & 부드러운 애니메이션 */
    .card,
    .game-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.75rem 0 !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    }
    
    .game-card:active {
        transform: scale(0.98) !important;
    }
    
    /* 모바일 버튼 크기 확대 (터치 친화적) */
    .btn {
        padding: 18px 32px !important;
        font-size: 1.1rem !important;
        min-height: 54px !important;
        font-weight: 700 !important;
        border-radius: 50px !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    }
    
    /* 모바일 입력 필드 */
    .input {
        padding: 18px 20px !important;
        font-size: 1.1rem !important;
        min-height: 54px !important;
        border-radius: 16px !important;
    }
    
    /* 갤러리 그리드 (2열) */
    .gallery-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    .photo-item {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* 방명록 작성 폼 */
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-group .input,
    .form-group textarea {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }
    
    /* 말씀 카드 - 전체 너비 사용 */
    .bible-card-elegant {
        padding: 1.5rem 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 24px !important;
    }
    
    .bible-card-header {
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }
    
    .bible-card-title {
        font-size: 1.5rem !important;
    }
    
    .bible-card-message,
    .bible-verse-text {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    .bible-card-name {
        font-size: 1.1rem !important;
    }
    
    .bible-verse-ref {
        font-size: 0.9rem !important;
    }
    
    /* 도장 선택기 */
    .stamp-selector {
        gap: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    .stamp-option {
        font-size: 1.5rem !important;
        padding: 0.5rem !important;
        min-width: 50px !important;
    }
    
    /* 방명록 엔트리 */
    .guestbook-entry {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* 벨벳 텍스처 */
    .velvet-texture {
        background: 
            repeating-linear-gradient(
                45deg,
                transparent,
                transparent 2px,
                rgba(0, 0, 0, 0.1) 2px,
                rgba(0, 0, 0, 0.1) 4px
            ),
            repeating-linear-gradient(
                -45deg,
                transparent,
                transparent 2px,
                rgba(0, 0, 0, 0.1) 2px,
                rgba(0, 0, 0, 0.1) 4px
            );
        background-size: 20px 20px;
    }
    
    .guestbook-velvet-container {
        background: linear-gradient(135deg, #2d1b2e 0%, #1a0f1a 100%) !important;
        box-shadow: 
            inset 0 0 50px rgba(0, 0, 0, 0.5),
            0 10px 40px rgba(0, 0, 0, 0.3) !important;
    }
    
.guestbook-card-board {
    max-width: 1100px;
    margin: 2rem auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guestbook-card {
    background: linear-gradient(135deg, #fffdf8, #fff6ea);
    border: 2px solid #f3d9c1;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.guestbook-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg width%3D%22200%22 height%3D%22200%22 viewBox%3D%220 0 200 200%22 xmlns%3D%22http://www.w3.org/2000/svg%22%3E%3Crect fill%3D%22none%22 stroke%3D%22%23f6d7c3%22 stroke-width%3D%220.5%22 width%3D%22200%22 height%3D%22200%22/%3E%3C/svg%3E');
    opacity: 0.4;
    pointer-events: none;
}

.guestbook-card > * {
    position: relative;
}

.guestbook-card-hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(120deg, #fef6ec, #ffe8f0);
}

.guestbook-card-hero .card-illustration {
    flex: 0 0 120px;
    height: 120px;
    min-width: 120px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0.2));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.guestbook-card-hero h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #c0392b;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 12px rgba(255, 255, 255, 0.6);
    writing-mode: horizontal-tb !important;
    text-orientation: mixed;
    line-height: 1.4;
}

.guestbook-card-form .form-group {
    margin-bottom: 1rem;
}

.guestbook-card-form input,
.guestbook-card-form textarea {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #f4d7c6;
}

.guestbook-card-form input[type="file"] {
    border: none;
    padding: 0;
}

.guestbook-card-form small {
    display: block;
    margin-top: 0.35rem;
    color: #a67a5b;
    font-size: 0.85rem;
}

.guestbook-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.guestbook-entry-card {
    background: #fffefa;
    border: 1px solid #f0d5c3;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.guestbook-entry-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 240, 230, 0.9));
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    opacity: 0.8;
}

.guestbook-entry-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.entry-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.entry-author {
    font-size: 1.1rem;
    font-weight: 700;
    color: #b3442c;
    letter-spacing: 0.02em;
}

.entry-date {
    font-size: 0.85rem;
    color: #a26b5b;
}

.entry-message {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a2f2b;
    white-space: pre-wrap;
    word-break: break-word;
}

.entry-drawing {
    margin-top: 1rem;
    border-radius: 14px;
    overflow: hidden;
    border: 2px dashed rgba(178, 52, 36, 0.2);
    background: rgba(255, 255, 255, 0.8);
}

.entry-drawing img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.guestbook-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #b17a63;
    font-weight: 600;
}
    
    /* WELCOME 2026 */
    .welcome-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem !important;
    }
    
    .year-number {
        font-size: 3.5rem !important;
    }
    
    /* 행운의 카드 */
    .cards-container {
        gap: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    .fortune-card {
        width: 100px !important;
        height: 160px !important;
    }
    
    .card-hover-label {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.75rem !important;
    }
    
    /* 카드 결과 */
    .result-card {
        padding: 2rem 1rem !important;
    }
    
    .result-card-emoji {
        font-size: 4rem !important;
    }
    
    .result-card-title {
        font-size: 1.5rem !important;
    }
    
    .result-card-subtitle {
        font-size: 1rem !important;
    }
    
    .result-card-message {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* 버튼 크기 */
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
    
    .btn-lg {
        padding: 1rem 2rem !important;
        font-size: 1.1rem !important;
    }
    
    /* 네비게이션 바 */
    .nav-bar {
        flex-direction: column !important;
        padding: 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    .nav-title {
        font-size: 1.1rem !important;
    }
    
    .nav-buttons {
        display: flex !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .nav-buttons .btn {
        flex: 1 !important;
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
    }
    
    /* 히어로 그리드 */
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
    }
    
    /* 마을 그리드 */
    .village-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        padding: 0.5rem !important;
    }
    
    .house {
        padding: 1.5rem 1rem !important;
    }
    
    /* 텔레스트레이션 */
    .canvas-container {
        width: 100% !important;
        overflow-x: auto !important;
    }
    
    #drawCanvas {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .canvas-tools {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    /* 퍼즐 */
    .puzzle-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* 마시멜로 타워 */
    .tower-display {
        padding: 1rem !important;
    }
    
    /* 선물 교환 */
    #peopleList .flex {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    /* 타이머 */
    .timer {
        font-size: 2.5rem !important;
        width: 80px !important;
        height: 80px !important;
    }
    
    /* 초대장 카드 */
    .invitation-card {
        padding: 2rem 1.5rem !important;
    }
    
    .invitation-title {
        font-size: 2rem !important;
    }
    
    .invitation-text {
        font-size: 0.95rem !important;
    }
    
    /* 봉투 애니메이션 */
    .envelope {
        width: 300px !important;
        height: 220px !important;
    }
    
    .envelope-card {
        font-size: 1.3rem !important;
        padding: 2rem 1.5rem !important;
    }
    
    /* 게임 카드 아이콘 */
    .card-icon {
        font-size: 3rem !important;
    }
    
    /* 텍스트 크기 조정 */
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    .game-title {
        font-size: 1.5rem !important;
    }
    
    /* 여백 제거 */
    body {
        padding: 0 !important;
    }
    
    #app {
        padding: 0 !important;
    }
    
    /* 테이블 반응형 */
    table {
        display: block !important;
        overflow-x: auto !important;
    }
    
    /* 이미지 반응형 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* 방명록 그리드 개선 */
    #guestbookEntries {
        padding: 0.5rem !important;
    }
    
    /* 행운의 카드 눈 효과 최적화 */
    .snowflake {
        font-size: 0.8rem !important;
    }
    
    /* Fortune header */
    .fortune-header {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .fortune-title {
        font-size: 1.5rem !important;
    }
    
    .fortune-subtitle {
        font-size: 1.2rem !important;
    }
    
    .fortune-desc {
        font-size: 1rem !important;
    }
    
    /* 롤링페이퍼 */
    .note-card {
        width: 100% !important;
        margin: 0.5rem 0 !important;
    }
    
    /* 하단 여백 확보 */
    .game-section:last-child,
    .game-card:last-child {
        margin-bottom: 2rem !important;
    }
}

/* 인스타그램 스타일 그리드 */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 0;
}

@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2px !important;
    }
}

.instagram-photo-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 비율 유지 */
    overflow: hidden;
    background: #f0f0f0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.instagram-photo-item:hover {
    opacity: 0.8;
}

.instagram-photo-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 사진 모달 스타일 */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.photo-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    z-index: 10001;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.photo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10003;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

/* 모달이 열렸을 때 nav-bar 숨기기 */
.photo-modal[style*="display: flex"] ~ .nav-bar,
.photo-modal[style*="display: block"] ~ .nav-bar {
    display: none !important;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .photo-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .photo-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

/* ==========================================
   성경 카드 선택 페이지 스타일
   ========================================== */

.bible-card-selection-container {
    min-height: 100vh;
    background: 
        linear-gradient(135deg, 
            rgba(245, 240, 230, 0.95) 0%,
            rgba(255, 250, 240, 0.95) 25%,
            rgba(250, 245, 235, 0.95) 50%,
            rgba(255, 250, 245, 0.95) 75%,
            rgba(245, 240, 235, 0.95) 100%
        ),
        radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.05), transparent 70%);
    padding: 2rem 1rem 4rem;
    position: relative;
    overflow: hidden;
}

.bible-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(139, 115, 85, 0.02) 2px, rgba(139, 115, 85, 0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(139, 115, 85, 0.02) 2px, rgba(139, 115, 85, 0.02) 4px);
    pointer-events: none;
    opacity: 0.5;
}

.bible-light-rays {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.3), transparent 40%),
        radial-gradient(ellipse at 30% 20%, rgba(255, 215, 0, 0.1), transparent 30%),
        radial-gradient(ellipse at 70% 20%, rgba(255, 215, 0, 0.1), transparent 30%);
    pointer-events: none;
    animation: lightPulse 6s ease-in-out infinite;
}

@keyframes lightPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.bible-selection-header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.bible-header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.decoration-angel {
    font-size: 2rem;
    animation: twinkle 2s ease-in-out infinite;
}

.decoration-cross {
    font-size: 2.5rem;
    color: #8b7355;
    text-shadow: 0 2px 4px rgba(139, 115, 85, 0.3);
}

/* 제거된 애니메이션 */
@keyframes crossGlow-removed {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.bible-selection-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b7355, #a0826d, #8b7355);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(139, 115, 85, 0.3);
    letter-spacing: 0.05em;
}

.bible-selection-subtitle {
    font-size: 1.2rem;
    color: #6b5744;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.bible-selection-desc {
    font-size: 1rem;
    color: #8b7355;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.bible-cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
    perspective: 1500px;
    position: relative;
    z-index: 2;
    min-height: 400px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    overflow: hidden;
}

.bible-cards-container:active {
    cursor: grabbing;
}

@media (max-width: 768px) {
    .bible-cards-container {
        padding: 2rem 0.5rem;
        min-height: 350px;
    }
    
    .bible-verse-card {
        width: 80px;
        height: 120px;
        margin-left: -40px; /* 카드 중앙 정렬 (width의 절반) */
    }
    
    /* 모바일도 동일한 부채꼴 (회전 범위 축소) */
    .bible-verse-card:nth-child(1) { transform: rotate(-57deg); }
    .bible-verse-card:nth-child(2) { transform: rotate(-51deg); }
    .bible-verse-card:nth-child(3) { transform: rotate(-45deg); }
    .bible-verse-card:nth-child(4) { transform: rotate(-39deg); }
    .bible-verse-card:nth-child(5) { transform: rotate(-33deg); }
    .bible-verse-card:nth-child(6) { transform: rotate(-27deg); }
    .bible-verse-card:nth-child(7) { transform: rotate(-21deg); }
    .bible-verse-card:nth-child(8) { transform: rotate(-15deg); }
    .bible-verse-card:nth-child(9) { transform: rotate(-9deg); }
    .bible-verse-card:nth-child(10) { transform: rotate(-3deg); }
    .bible-verse-card:nth-child(11) { transform: rotate(3deg); }
    .bible-verse-card:nth-child(12) { transform: rotate(9deg); }
    .bible-verse-card:nth-child(13) { transform: rotate(15deg); }
    .bible-verse-card:nth-child(14) { transform: rotate(21deg); }
    .bible-verse-card:nth-child(15) { transform: rotate(27deg); }
    .bible-verse-card:nth-child(16) { transform: rotate(33deg); }
    .bible-verse-card:nth-child(17) { transform: rotate(39deg); }
    .bible-verse-card:nth-child(18) { transform: rotate(45deg); }
    .bible-verse-card:nth-child(19) { transform: rotate(51deg); }
    .bible-verse-card:nth-child(20) { transform: rotate(57deg); }
    
    .bible-verse-card:hover,
    .bible-verse-card.active {
        /* 모바일에서는 호버 효과 비활성화 */
    }
}

.bible-verse-card {
    width: 120px;
    height: 180px;
    position: absolute;
    cursor: pointer; /* PC에서는 pointer, 모바일에서는 grab */
    transform-style: flat;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center bottom; /* 카드 하단 중앙이 회전축 */
    bottom: 50px;
    left: 50%;
    margin-left: -60px; /* 카드 중앙 정렬 (width의 절반) */
    will-change: transform, opacity;
}

/* 모바일에서만 grab 커서 */
@media (max-width: 768px) {
    .bible-verse-card {
        cursor: grab;
    }
    
    .bible-verse-card:active {
        cursor: grabbing;
    }
}

/* 부채꼴 배치 - 모든 카드가 같은 위치에서 각도만 다르게 (회전 범위 축소: -57도 ~ +57도) */
.bible-verse-card:nth-child(1) { transform: rotate(-57deg); z-index: 1; }
.bible-verse-card:nth-child(2) { transform: rotate(-51deg); z-index: 2; }
.bible-verse-card:nth-child(3) { transform: rotate(-45deg); z-index: 3; }
.bible-verse-card:nth-child(4) { transform: rotate(-39deg); z-index: 4; }
.bible-verse-card:nth-child(5) { transform: rotate(-33deg); z-index: 5; }
.bible-verse-card:nth-child(6) { transform: rotate(-27deg); z-index: 6; }
.bible-verse-card:nth-child(7) { transform: rotate(-21deg); z-index: 7; }
.bible-verse-card:nth-child(8) { transform: rotate(-15deg); z-index: 8; }
.bible-verse-card:nth-child(9) { transform: rotate(-9deg); z-index: 9; }
.bible-verse-card:nth-child(10) { transform: rotate(-3deg); z-index: 10; }
.bible-verse-card:nth-child(11) { transform: rotate(3deg); z-index: 11; }
.bible-verse-card:nth-child(12) { transform: rotate(9deg); z-index: 12; }
.bible-verse-card:nth-child(13) { transform: rotate(15deg); z-index: 13; }
.bible-verse-card:nth-child(14) { transform: rotate(21deg); z-index: 14; }
.bible-verse-card:nth-child(15) { transform: rotate(27deg); z-index: 15; }
.bible-verse-card:nth-child(16) { transform: rotate(33deg); z-index: 16; }
.bible-verse-card:nth-child(17) { transform: rotate(39deg); z-index: 17; }
.bible-verse-card:nth-child(18) { transform: rotate(45deg); z-index: 18; }
.bible-verse-card:nth-child(19) { transform: rotate(51deg); z-index: 19; }
.bible-verse-card:nth-child(20) { transform: rotate(57deg); z-index: 20; }

/* 호버/활성화 시 카드가 위로 튀어나옴 */
/* hover 효과 제거 - 안정성 우선 */

/* 중앙 카드 하이라이트 - 더 명확하게 */
.bible-verse-card.center-card {
    filter: brightness(1.08) drop-shadow(0 0 8px rgba(255, 215, 0, 0.3));
}

/* PC에서 선택된 카드 스타일 - 회전 대신 앞으로 나오고 위로 올라가기 */
@media (min-width: 769px) {
    .bible-verse-card.selected {
        z-index: 999 !important;
        transform: translateY(-40px) rotate(0deg) scale(1.1) !important;
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0s !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* PC에서 카드 호버 시 약간 위로 올라감 */
    .bible-verse-card:hover {
        transform: translateY(-10px) scale(1.02) !important;
        transition: transform 0.2s ease !important;
        z-index: 100 !important;
    }
}

/* 말씀카드 결과 - 이미지 배경 스타일 */
.bible-card-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 32px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 35px 100px rgba(139, 69, 19, 0.3),
        0 20px 60px rgba(101, 67, 33, 0.4),
        inset 0 3px 0 rgba(255, 255, 255, 0.3);
    min-height: 600px;
    max-width: 500px;
    margin: 0 auto;
}

.bible-card-overlay {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 250, 240, 0.55) 20%,
        rgba(255, 245, 230, 0.65) 100%
    );
    backdrop-filter: blur(1px);
    padding: 2rem 1.5rem;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 32px;
}

@keyframes bibleCardEntry {
    0% {
        opacity: 0;
        transform: translateY(50px) rotateY(-20deg) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateY(0deg) scale(1);
    }
}

.bible-verse-card:nth-child(1) { animation-delay: 0.05s; }
.bible-verse-card:nth-child(2) { animation-delay: 0.1s; }
.bible-verse-card:nth-child(3) { animation-delay: 0.15s; }
.bible-verse-card:nth-child(4) { animation-delay: 0.2s; }
.bible-verse-card:nth-child(5) { animation-delay: 0.25s; }
.bible-verse-card:nth-child(6) { animation-delay: 0.3s; }
.bible-verse-card:nth-child(7) { animation-delay: 0.35s; }
.bible-verse-card:nth-child(8) { animation-delay: 0.4s; }
.bible-verse-card:nth-child(9) { animation-delay: 0.45s; }
.bible-verse-card:nth-child(10) { animation-delay: 0.5s; }
.bible-verse-card:nth-child(11) { animation-delay: 0.55s; }
.bible-verse-card:nth-child(12) { animation-delay: 0.6s; }
.bible-verse-card:nth-child(13) { animation-delay: 0.65s; }
.bible-verse-card:nth-child(14) { animation-delay: 0.7s; }
.bible-verse-card:nth-child(15) { animation-delay: 0.75s; }
.bible-verse-card:nth-child(16) { animation-delay: 0.8s; }
.bible-verse-card:nth-child(17) { animation-delay: 0.85s; }
.bible-verse-card:nth-child(18) { animation-delay: 0.9s; }
.bible-verse-card:nth-child(19) { animation-delay: 0.95s; }
.bible-verse-card:nth-child(20) { animation-delay: 1s; }

.bible-verse-card:hover .bible-card-hover-label {
    opacity: 1;
    transform: translateY(0);
}

.bible-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bible-card-back {
    width: 100%;
    height: 100%;
    /* 기본 배경은 인라인 스타일로 이미지 지정됨 */
    background-color: #5d4037; /* fallback */
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        0 15px 40px rgba(101, 67, 33, 0.6),
        inset 0 2px 0 rgba(255, 215, 0, 0.4),
        inset 0 0 60px rgba(139, 69, 19, 0.3);
    /* 이미지 위에 어두운 오버레이 */
    background-image: 
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 3px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 3px
        );
}

/* 금박 테두리 - 애니메이션 제거 */
.bible-card-back::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, 
        #B8860B 0%,
        #DAA520 50%,
        #B8860B 100%
    );
    border-radius: 16px;
    z-index: -1;
    box-shadow: 
        0 0 15px rgba(218, 165, 32, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 182, 193, 0.9));
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.6) drop-shadow(0 0 25px rgba(255, 105, 180, 1));
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1.3) drop-shadow(0 0 15px rgba(255, 182, 193, 0.9));
    }
}

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

/* 키라키라 효과 제거 */
.bible-card-back::after {
    content: none;
}

@keyframes sparkleWave {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
        transform: scale(1.1) rotate(5deg);
    }
}

/* 이모지 장식 제거 */
.bible-card-inner::before,
.bible-card-inner::after {
    content: none;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(180deg);
    }
}

@keyframes heartBeat {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.bible-card-cross {
    display: none; /* 십자가 제거 */
}

.bible-card-light {
    display: none; /* 빛 효과 제거 */
} 
        drop-shadow(0 0 10px rgba(255, 105, 180, 0.8))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.6))
        drop-shadow(0 0 30px rgba(255, 182, 193, 0.4));
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    animation: rainbowCrossPulse 4s ease-in-out infinite;
}

@keyframes rainbowCrossPulse {
    0%, 100% {
        background-position: 0% 50%;
        transform: scale(1) rotate(0deg);
    }
    25% {
        background-position: 50% 50%;
        transform: scale(1.05) rotate(2deg);
    }
    50% {
        background-position: 100% 50%;
        transform: scale(1.1) rotate(0deg);
    }
    75% {
        background-position: 50% 50%;
        transform: scale(1.05) rotate(-2deg);
    }
}

/* 빛 효과 제거됨 */

/* 카드 번호 제거됨 */
.bible-card-number-removed {
    display: none;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(255, 105, 180, 0.5));
}

.bible-card-hover-label {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(74, 52, 40, 0.9);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* ==========================================
   산타 메시지 애니메이션
   ========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-100px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* ==========================================
   트리 흔들기 게임 스타일
   ========================================== */
.tree-shake-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #1a5f3f 0%, #0d3d26 50%, #1a5f3f 100%);
    position: relative;
    overflow: hidden;
}

.tree-shake-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.tree-shake-game {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tree-shake-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.tree-shake-description {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tree-shake-start,
.tree-shake-playing,
.tree-shake-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.tree-shake-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(26, 95, 63, 0.1);
    border-radius: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(26, 95, 63, 0.9);
}

.tree-shake-timer {
    font-size: 2rem;
    font-weight: 800;
    color: #d32f2f;
    text-shadow: 0 2px 8px rgba(211, 47, 47, 0.5);
}

.tree-shake-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e7d32;
}

.tree-shake-power {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e7d32;
    transition: all 0.3s ease;
}

.tree-container {
    position: relative;
    width: 100%;
    height: 350px;
    margin: 2rem 0;
    background: linear-gradient(180deg, #87ceeb 0%, #98fb98 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

.christmas-tree {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.christmas-tree::before {
    content: '🎄';
    font-size: 15rem;
    position: absolute;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    animation: treeSway 3s ease-in-out infinite;
}

@keyframes treeSway {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

@keyframes treeShake {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    10% {
        transform: translateX(-5px) rotate(-3deg);
    }
    20% {
        transform: translateX(5px) rotate(3deg);
    }
    30% {
        transform: translateX(-4px) rotate(-2deg);
    }
    40% {
        transform: translateX(4px) rotate(2deg);
    }
    50% {
        transform: translateX(-3px) rotate(-1deg);
    }
    60% {
        transform: translateX(3px) rotate(1deg);
    }
    70% {
        transform: translateX(-2px) rotate(-1deg);
    }
    80% {
        transform: translateX(2px) rotate(1deg);
    }
    90% {
        transform: translateX(-1px) rotate(0deg);
    }
}

@keyframes ornamentShake {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-3px, 2px) rotate(-5deg);
    }
    50% {
        transform: translate(3px, -2px) rotate(5deg);
    }
    75% {
        transform: translate(-2px, 1px) rotate(-3deg);
    }
}

.ornament {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.1s;
    user-select: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.ornament:hover {
    transform: scale(1.2);
}

.ornament.gold {
    animation: goldGlow 2s ease-in-out infinite;
}

@keyframes goldGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }
}

.ornament.bell {
    animation: bellRing 1.5s ease-in-out infinite;
}

@keyframes bellRing {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.tree-shake-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.btn-shake {
    font-size: 1.5rem;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    transition: all 0.2s;
    user-select: none;
    font-weight: 700;
}

.btn-shake:active {
    transform: scale(0.95);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
}

.fallen-ornaments-container {
    margin-top: 2rem;
    min-height: 100px;
    background: rgba(139, 69, 19, 0.2);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
    border: 2px dashed rgba(139, 69, 19, 0.4);
}

.fallen-ornament {
    animation: dropIn 0.3s ease-out;
}

@keyframes dropIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tree-shake-result {
    animation: fadeIn 0.5s ease;
}

.tree-shake-final-score {
    margin: 2rem 0;
}

.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.score-number {
    font-size: 5rem;
    font-weight: 900;
    color: #2e7d32;
    text-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.score-label {
    font-size: 2rem;
    color: #666;
    font-weight: 600;
}

.tree-shake-message {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9c4 0%, #ffccbc 100%);
    border-radius: 16px;
    border-left: 4px solid #667eea;
}

.best-score-display {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.tree-shake-title-badge {
    margin: 1rem 0;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 16px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #8b4513;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

@keyframes recordBreak {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3) rotate(10deg);
        color: #d32f2f;
    }
    100% {
        transform: scale(1);
    }
}

@keyframes badgeAppear {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.8);
    }
    50% {
        transform: translateY(0) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.btn-large {
    font-size: 1.3rem;
    padding: 1.2rem 2.5rem;
    margin: 0.5rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .tree-shake-container {
        padding: 1rem 0.5rem;
    }
    
    .tree-shake-title {
        font-size: 2rem;
    }
    
    .tree-container {
        height: 400px;
    }
    
    .christmas-tree::before {
        font-size: 12rem;
    }
    
    .tree-shake-timer {
        font-size: 1.5rem;
    }
    
    .tree-shake-score {
        font-size: 1.2rem;
    }
    
    .btn-shake {
        font-size: 1.2rem;
        padding: 1.2rem 2rem;
    }
    
    .score-number {
        font-size: 4rem;
    }
    
    .tree-shake-message {
        font-size: 1.1rem;
    }
}

/* ==========================================
   황금알 찾기 게임 스타일
   ========================================== */
.egg-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.egg-preview-content {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes eggPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.golden-egg-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe8cc 50%, #ffe0b2 100%);
    position: relative;
    overflow-x: hidden;
}

.golden-egg-game {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.golden-egg-header {
    text-align: center;
    margin-bottom: 2rem;
}

.golden-egg-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #8b4513;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stage-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stage-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stage-name {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
}

.golden-egg-game-area {
    position: relative;
    min-height: 400px;
    margin: 2rem 0;
}

.boxes-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 2rem;
    padding: 0;
    min-height: 360px;
}

.golden-egg-box {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #ffd89b 0%, #ffb347 100%);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: absolute;
    transform: translate(-50%, -50%);
    overflow: visible;
}

.golden-egg-icon {
    width: 1.6rem;
    height: auto;
    vertical-align: middle;
    margin-right: 0.35rem;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.golden-egg-icon-lg {
    width: 2.4rem;
    height: auto;
    vertical-align: middle;
    margin-right: 0.4rem;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.7));
}

.golden-egg-image {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px #ffd700) drop-shadow(0 0 20px rgba(255, 215, 0, 0.9));
}

.golden-egg-box:hover:not(.is-swapping) {
    transform: translate(-50%, -55%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.golden-egg-box.is-swapping {
    pointer-events: none;
    z-index: 25;
}

.golden-egg-box.shuffling {
    animation: shuffleMove 0.4s ease;
}

.golden-egg-box.correct {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    animation: correctPulse 0.6s ease;
    transform: translate(-50%, -50%) scale(1.02);
}

.golden-egg-box.wrong {
    background: linear-gradient(135deg, #ffcccc, #ff9999);
    animation: wrongShake 0.5s ease;
}

.box-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.box-content {
    font-size: 2.5rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.distraction-area {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    overflow: hidden;
}

.distraction-item {
    position: absolute;
    font-size: 2.5rem;
    pointer-events: none;
    z-index: 10;
}

.distraction-item.carrot {
    bottom: 0;
    left: -50px;
}

.distraction-item.carrot.animate {
    animation: carrotMove 2s ease-out forwards;
}

.distraction-item.walnut {
    bottom: 20px;
    left: -50px;
}

.distraction-item.walnut.animate {
    animation: walnutRoll 1.5s ease-out forwards;
}

.distraction-item.feather {
    top: -10%;
    font-size: 2rem;
    opacity: 0;
}

.distraction-item.feather.fall {
    animation: featherDrop 1.4s linear forwards;
}

.distraction-item.goose {
    display: none;
}

.distraction-item.goose-formation {
    left: -20%;
    top: 15%;
    width: 160px;
    height: 100px;
    opacity: 0.9;
}

.distraction-item.goose-formation span {
    position: absolute;
    font-size: 2.1rem;
}

.distraction-item.goose-formation.fly {
    animation: gooseFly 1.6s linear forwards;
}

.distraction-item.animal {
    bottom: 10px;
    font-size: 2rem;
}

.distraction-item.animal.animate {
    animation: animalMove 1s ease-out forwards;
}

.distraction-item.animal-runner {
    bottom: 5px;
    display: flex;
    gap: 0.35rem;
    font-size: 2.5rem;
    opacity: 0.95;
}

.distraction-item.animal-runner.run {
    animation: animalHop 1s ease-in-out forwards;
}

.golden-egg-controls {
    text-align: center;
    margin-top: 2rem;
}

.golden-egg-result {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
}

.result-message {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-message.success {
    color: #2e7d32;
}

.result-message.failure {
    color: #c62828;
}

.result-animation {
    margin-top: 1rem;
}

.golden-egg-complete {
    text-align: center;
    padding: 2rem;
}

.completion-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.badge-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.badge-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.badge-subtitle {
    font-size: 1.1rem;
    color: #666;
}

.firework {
    position: absolute;
    font-size: 2rem;
    animation: fireworkExplode 1s ease-out forwards;
}

.star-particle {
    position: absolute;
    font-size: 1.5rem;
    transition: all 0.5s ease;
    pointer-events: none;
}

/* 애니메이션 */
@keyframes shuffleMove {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

@keyframes correctPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

@keyframes wrongShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes carrotMove {
    0% {
        left: -50px;
    }
    100% {
        left: calc(100% + 50px);
    }
}

@keyframes walnutRoll {
    0% {
        left: -50px;
        transform: rotate(0deg);
    }
    100% {
        left: calc(100% + 50px);
        transform: rotate(720deg);
    }
}

@keyframes featherFall {
    0% {
        top: 0;
        opacity: 1;
        transform: rotate(0deg);
    }
    100% {
        top: 100%;
        opacity: 0;
        transform: rotate(360deg);
    }
}

@keyframes featherDrop {
    0% {
        transform: translate(-50%, -30px) rotate(-15deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 260px) rotate(15deg);
        opacity: 0;
    }
}

@keyframes gooseFly {
    0% {
        transform: translate(-10%, 0) rotate(-6deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translate(140%, -50%) rotate(-6deg);
        opacity: 0;
    }
}

@keyframes animalMove {
    0% {
        left: -50px;
        opacity: 1;
    }
    100% {
        left: calc(100% + 50px);
        opacity: 0;
    }
}

@keyframes animalHop {
    0% {
        transform: translate(0, 0);
    }
    40% {
        transform: translate(40px, -30px);
    }
    70% {
        transform: translate(80px, 0);
    }
    100% {
        transform: translate(140px, -20px);
        opacity: 0;
    }
}

@keyframes fireworkExplode {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .golden-egg-container {
        padding: 1rem 0.5rem;
    }
    
    .golden-egg-game {
        padding: 1.5rem;
    }
    
    .golden-egg-title {
        font-size: 2rem;
    }
    
    .golden-egg-box {
        width: 100px;
        height: 100px;
    }
    
    .box-icon {
        font-size: 2.5rem;
    }
    
    .box-content {
        font-size: 2rem;
    }
    
    .distraction-item {
        font-size: 2rem;
    }
    
    .distraction-item.goose-formation span {
        font-size: 2.2rem;
    }
    
    .stage-badge {
        font-size: 1rem;
        padding: 0.4rem 1.2rem;
    }
    
    .stage-name {
        font-size: 1rem;
    }
    
    .result-message {
        font-size: 1.2rem;
    }
    
    .badge-title {
        font-size: 1.5rem;
    }
    
    .badge-icon {
        font-size: 3rem;
    }
}

/* ==========================================
   산타 사탕 스크래치 게임 스타일
   ========================================== */
@keyframes candyFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.santa-candy-container {
    min-height: 100vh;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #2c1810 0%, #5A2C46 50%, #3d1f2e 100%);
    position: relative;
    overflow-x: hidden;
}

/* 혜택 안내 화면 */
.reward-info-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.reward-info-card {
    max-width: 600px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid;
    border-image: linear-gradient(135deg, #C9A76B, #E8D9A1) 1;
}

.reward-info-header {
    text-align: center;
    margin-bottom: 2rem;
}

.reward-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reward-item {
    padding: 1.25rem;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.3s ease;
}

.reward-item.legend {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, #fff5f5, #ffe0e0);
}

.reward-item.super-rare {
    border-color: #ff9ff3;
    background: linear-gradient(135deg, #fff5fc, #ffe0f5);
}

.reward-item.rare {
    border-color: #ffd93d;
    background: linear-gradient(135deg, #fffef5, #fff9e0);
}

.reward-item.uncommon {
    border-color: #6bcf7f;
    background: linear-gradient(135deg, #f5fff8, #e0ffe8);
}

.reward-item.normal {
    border-color: #95a5a6;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.reward-badge {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #5A2C46;
}

.reward-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.reward-desc {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.5;
}

/* 스크래치 카드 화면 */
.scratch-card-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.scratch-card-container {
    max-width: 500px;
    width: 100%;
}

.scratch-card-wrapper {
    position: relative;
    margin: 2rem 0;
}

.scratch-card {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #5A2C46;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 4px solid;
    border-image: linear-gradient(135deg, #C9A76B, #E8D9A1) 1;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    touch-action: none;
    z-index: 2;
}

.scratch-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
    background: #5A2C46;
}

.message-content {
    text-align: center;
    color: #E8D9A1;
}

.message-rarity {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.message-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.message-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.scratch-progress {
    margin-top: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A76B, #E8D9A1);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.scratch-particle {
    position: absolute;
    pointer-events: none;
    z-index: 1000;
}

/* 결과 화면 */
.result-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.result-card {
    max-width: 500px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid;
    border-image: linear-gradient(135deg, #C9A76B, #E8D9A1) 1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.result-sparkle {
    position: absolute;
    font-size: 1.5rem;
    animation: sparkleFloat 1s ease-out forwards;
}

@keyframes sparkleFloat {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
}

.result-content {
    position: relative;
    z-index: 2;
}

.result-rarity {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #5A2C46;
}

.result-rarity.legend {
    color: #ff6b6b;
}

.result-rarity.super-rare {
    color: #ff9ff3;
}

.result-rarity.rare {
    color: #ffa500;
}

.result-rarity.uncommon {
    color: #6bcf7f;
}

.result-rarity.normal {
    color: #95a5a6;
}

.result-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-family: 'Montserrat', sans-serif;
    animation: resultAppear 0.8s ease-out;
}

.result-desc {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    animation: resultAppear 1s ease-out;
}

@keyframes resultAppear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .reward-info-card {
        padding: 1.5rem;
    }
    
    .reward-title {
        font-size: 1rem;
    }
    
    .scratch-card {
        border-width: 3px;
    }
    
    .message-title {
        font-size: 1.5rem;
    }
    
    .message-desc {
        font-size: 1rem;
    }
    
    .result-title {
        font-size: 1.6rem;
    }
    
    .result-desc {
        font-size: 1rem;
    }
}
