* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Jua', sans-serif;
    background: #000000;
    /* Pure black background for maximum contrast */
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* CSS Variables */
:root {
    --primary-color: #9B59B6;
    --secondary-color: #8E44AD;
    --background-color: #f5f5f5;
    --text-color: #333;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

/* Magic Wand Cursor Styling */
* {
    cursor: url('../assets/cursor-wand.svg') 16 16, auto;
}

/* Interactive elements get glowing wand cursor */
a, button, input[type="button"], input[type="submit"], 
.clickable, [onclick], [role="button"],
.meat-option, .spell-option, .vegetable-option, .spice-option, .bowl-option,
.kitchen-nav-btn, .chat-nav-btn, .mobile-tab-btn, .home-btn,
.start-magic-btn, .explorer-btn, .layout-preset-btn {
    cursor: url('../assets/cursor-wand-pointer.svg') 16 16, pointer !important;
}

/* Text input areas keep default cursor for usability */
input[type="text"], input[type="email"], input[type="password"], 
input[type="number"], input[type="tel"], input[type="url"],
textarea, [contenteditable="true"] {
    cursor: text !important;
}

/* Special cursors for specific states */
.draggable, [draggable="true"] {
    cursor: move !important;
}

.resizable {
    cursor: nwse-resize !important;
}

/* Loading state cursor */
.loading, .processing {
    cursor: wait !important;
}

/* Disabled elements show not-allowed cursor */
:disabled, [disabled], .disabled {
    cursor: not-allowed !important;
}

/* Links in hover state */
a:hover, button:hover {
    cursor: url('../assets/cursor-wand-pointer.svg') 16 16, pointer !important;
}

/* Mobile Touch Magic Effect */
@media (hover: none) and (pointer: coarse) {
    /* Remove cursor on touch devices */
    * {
        cursor: auto !important;
    }
    
    /* Add magic touch ripple effect */
    button, a, .clickable, [onclick], [role="button"],
    .meat-option, .spell-option, .vegetable-option, .spice-option, .bowl-option,
    .kitchen-nav-btn, .chat-nav-btn, .mobile-tab-btn, .home-btn,
    .start-magic-btn, .explorer-btn, .layout-preset-btn {
        position: relative;
        overflow: hidden;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Magic touch ripple */
    button::after, a::after, .clickable::after, [onclick]::after, [role="button"]::after,
    .meat-option::after, .spell-option::after, .vegetable-option::after, 
    .spice-option::after, .bowl-option::after,
    .kitchen-nav-btn::after, .chat-nav-btn::after, .mobile-tab-btn::after, 
    .home-btn::after, .start-magic-btn::after, .explorer-btn::after, .layout-preset-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 215, 0, 0.6), rgba(155, 89, 182, 0.4));
        transform: translate(-50%, -50%);
        pointer-events: none;
        transition: width 0.6s, height 0.6s, opacity 0.6s;
        opacity: 0;
    }
    
    /* Active state triggers ripple */
    button:active::after, a:active::after, .clickable:active::after, 
    [onclick]:active::after, [role="button"]:active::after,
    .meat-option:active::after, .spell-option:active::after, 
    .vegetable-option:active::after, .spice-option:active::after, .bowl-option:active::after,
    .kitchen-nav-btn:active::after, .chat-nav-btn:active::after, 
    .mobile-tab-btn:active::after, .home-btn:active::after,
    .start-magic-btn:active::after, .explorer-btn:active::after, .layout-preset-btn:active::after {
        width: 300px;
        height: 300px;
        opacity: 0;
        transition: width 0s, height 0s, opacity 0.6s;
    }
}

/* Sparkle animation for touch feedback */
@keyframes magicSparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) rotate(360deg);
    }
}

/* 메인 컨테이너 */
.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1050;
    background: #000000;
}

.main-container.active {
    display: flex !important;
}

/* 웰컴 오버레이 - 원피스 포스터 */
#welcome-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    transition: opacity 0.7s;
    opacity: 1;
    padding: 15px;
}

#welcome-overlay.active {
    display: flex !important;
    opacity: 1;
}

#welcome-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* 원피스 스타일 포스터 */
.wanted-poster {
    position: relative;
    width: 95%;
    max-width: 400px;
    background: #f4e8d0;
    border: 8px solid #8b6914;
    border-radius: 5px;
    padding: 25px 20px;
    box-shadow:
        0 0 50px rgba(255, 215, 0, 0.5),
        0 20px 40px rgba(0, 0, 0, 0.5);
    transform: rotate(-2deg);
    transition: all 0.3s ease;
}

.wanted-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

.poster-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 2.2em;
    color: #8b0000;
    text-shadow: 3px 3px 0 #000;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 5px;
}

.poster-content {
    text-align: center;
}

.poster-image {
    width: 120px;
    height: 120px;
    margin: 20px auto;
    background: #fff;
    border: 5px solid #8b6914;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.poster-text {
    color: #2c1810;
    font-size: 1.1em;
    line-height: 1.8;
    margin: 20px 0;
    text-align: center;
}

.poster-text strong {
    color: #8b0000;
}

#enter-village-btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.2em;
    font-family: 'Black Han Sans', sans-serif;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    border: 3px solid #8b0000;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

#enter-village-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* 채팅 섹션 */
.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
    /* Pure black background - no transparency */
    min-height: 50vh;
    max-height: 100vh;
    border-right: 2px solid #333333;
    position: relative;
    /* Add positioning context */
    z-index: 1100;
    /* Higher z-index than video */
}

/* Remove any backdrop filters that might cause blur */
.chat-section * {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* 채팅 헤더 - 미니 포스터 스타일 */
.chat-header {
    background: #1a237e;
    /* Deep blue for maximum contrast */
    padding: 20px;
    /* Proper spacing for desktop */
    text-align: center;
    position: relative;
    border-bottom: 2px solid #333333;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 10px solid #a0812a;
}

/* Chat header content layout */
.chat-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 10px;
    padding: 0 60px; /* Space for home button */
}

/* Kitchen header - matching chat header style */
.kitchen-header {
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.12) 0%, 
        rgba(255, 215, 0, 0.08) 50%, 
        rgba(212, 175, 55, 0.12) 100%);
    /* Subtle gold gradient aligned with overall tone */
    padding: 24px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1);
}

/* Removed decorative triangle for cleaner spatial optimization */

/* Kitchen header content layout */
.kitchen-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    /* Optimized for perfect spatial centering and symmetry */
}

/* Kitchen title */
.kitchen-title {
    color: #2C3E50;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin: 0;
    padding: 0 16px;
    text-align: center;
    /* Optimized for spatial balance and visual hierarchy */
    position: relative;
    z-index: 1;
}

/* Kitchen navigation button - Silver luxury design */
.kitchen-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 24px !important;
    text-align: center !important;
    background: linear-gradient(135deg, #f1f3f4 0%, #ffffff 100%) !important;
    border: 2px solid #9aa0a6 !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
    min-width: 160px !important;
    color: #495057;
    font-family: 'Jua', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.kitchen-nav-btn::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.5s ease;
}

.kitchen-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(192, 192, 192, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border-color: #696969;
}

.kitchen-nav-btn:hover::before {
    left: 100%;
}

.kitchen-nav-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(192, 192, 192, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

/* Hover effects for kitchen nav button */
.kitchen-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.kitchen-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kitchen-btn-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease;
}

.kitchen-nav-btn:hover .kitchen-btn-icon {
    transform: scale(1.1);
}

.kitchen-btn-text {
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #2c3e50 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
}

/* Chat navigation button - Gold luxury design */
.chat-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 14px 24px !important;
    text-align: center !important;
    background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%) !important;
    border: 2px solid #4285f4 !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.15) !important;
    min-width: 160px !important;
    color: #1976d2;
    font-family: 'Jua', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

/* Hover effects for chat nav button */
.chat-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.2);
    border-color: #42a5f5;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%);
}

.chat-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

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

.chat-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border-color: #DAA520;
}

.chat-nav-btn:hover::before {
    left: 100%;
}

.chat-nav-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
}

.chat-btn-icon {
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(33, 150, 243, 0.2));
    transition: transform 0.2s ease;
}

.chat-nav-btn:hover .chat-btn-icon {
    transform: scale(1.1);
}

.chat-btn-text {
    font-weight: 600 !important;
    white-space: nowrap !important;
    text-align: center !important;
    color: #1565c0 !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
}

/* Responsive design for kitchen button */
@media (max-width: 768px) {
    .chat-header-content {
        flex-direction: column;
        gap: 12px;
    }

    .chat-title {
        font-size: 1.2em;
    }

    .kitchen-nav-btn {
        min-width: 140px;
        padding: 16px 12px;
        /* Increased from 8px to 16px for 44px minimum touch target */
        font-size: 11px;
        min-height: 44px;
        /* Ensure minimum touch target height */
    }

    .kitchen-btn-icon {
        font-size: 14px;
    }

    .kitchen-header-content {
        flex-direction: column;
        gap: 12px;
    }

    .kitchen-title {
        font-size: 1.2em;
    }

    .chat-nav-btn {
        min-width: 140px;
        padding: 16px 12px;
        /* Increased from 8px to 16px for 44px minimum touch target */
        font-size: 11px;
        min-height: 44px;
        /* Ensure minimum touch target height */
    }

    .chat-btn-icon {
        font-size: 14px;
    }
}

.village-badge {
    display: inline-block;
    background: rgba(248, 249, 250, 0.95);
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    margin-bottom: 20px;
    font-size: 0.9em;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.15);
    /* Centered positioning for optimal spatial hierarchy */
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.chat-title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.2;
    text-transform: none;
    margin: 0;
    padding: 0;
}

/* 채팅 메시지 영역 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    background: #0a0a0a;
    /* Slightly lighter than pure black for contrast */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.chat-messages::-webkit-scrollbar {
    width: 12px;
    /* Wider scrollbar */
}

.chat-messages::-webkit-scrollbar-track {
    background: #000000;
    border-left: 2px solid #333333;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 6px;
    border: 2px solid #000000;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* 메시지 스타일 */
.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    /* More spacing between messages */
    padding: 0 16px;
    /* More horizontal padding */
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.message.corin {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 2.2em;
    /* Optimized emoji size */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    margin: 0 8px;
    /* Tighter spacing */
    transition: transform 0.2s ease;
}

.message:hover .message-avatar {
    transform: scale(1.1);
}

.message:hover .message-content {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.message-content {
    max-width: 85%;
    padding: 16px 20px;
    /* Optimized padding */
    border-radius: 12px;
    line-height: 1.7;
    font-size: 16px;
    /* Optimal readable size */
    font-weight: 500;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin: 4px 0;
    transition: transform 0.2s ease;
}

.message.corin .message-content {
    background: #1e3a8a;
    /* Slightly brighter blue for better visibility */
    color: #ffffff;
    border-bottom-left-radius: 4px;
    border: 1px solid #2563eb;
}

.message.user .message-content {
    background: #f0f9ff;
    /* Brighter background */
    color: #0a0a0a;
    /* Near black for better readability */
    border-bottom-right-radius: 4px;
    border: 1px solid #3b82f6;
}

/* Error Message Styles */
.message.corin.error .message-content {
    background: #b71c1c;
    /* Deep red */
    color: #ffffff;
    border-bottom-left-radius: 4px;
    font-weight: 600;
}

/* 채팅 입력 영역 */
.chat-input {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #000000;
    border-top: 1px solid #333333;
    min-height: 60px;
    position: relative;
    z-index: 1100;
    width: 100%;
}

.chat-input form {
    display: flex;
    gap: 12px;
    width: 100%;
    flex: 1;
}

.chat-input input {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
    padding: 20px 24px;
    border: 2px solid #333333;
    border-radius: 12px;
    background: #ffffff;
    color: #000000;
    font-size: 18px;
    font-family: 'Jua', sans-serif;
    font-weight: 500;
    min-height: 64px;
    transition: all 0.3s ease;
}

.chat-input input:focus {
    background: #ffffff;
    border-color: #1a237e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.3);
    transform: translateY(-2px);
    /* Slight lift effect */
}

.chat-input input::placeholder {
    color: #666666;
    /* Darker placeholder text */
    font-weight: 500;
}

.chat-input button {
    padding: 20px 32px;
    /* Increased padding */
    border: none;
    border-radius: 12px;
    background: #1a237e;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    min-width: 100px;
    /* Wider button */
    min-height: 64px;
    /* Taller button */
    transition: all 0.3s ease;
    align-self: flex-end;
    /* Align with input bottom */
}

.chat-input button:hover:not(:disabled) {
    background: #283593;
    /* Slightly lighter blue */
}

.chat-input button:disabled {
    background: #666666;
    cursor: not-allowed;
}

/* 지갑 섹션 (오른쪽) */
.wallet-section {
    width: 0;
    background: rgba(255, 255, 255, 0.03);
    transition: width 0.5s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wallet-section.active {
    width: 400px;
}

.wallet-header {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    padding: 20px;
    text-align: center;
    color: white;
    font-size: 1.3em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wallet-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 미니 포스터 (플로팅) */
.mini-poster {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 60px;
    height: 80px;
    background: #f4e8d0;
    border: 3px solid #8b6914;
    border-radius: 3px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    text-align: center;
    color: #8b0000;
    font-weight: bold;
}

.mini-poster:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.mini-poster-icon {
    font-size: 2em;
    margin-bottom: 5px;
}

/* 타이핑 인디케이터 */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 16px 24px;
    background: #1a237e;
    border-radius: 8px;
    width: fit-content;
}

.typing-dot {
    width: 10px;
    /* Larger dots */
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .wallet-section.active {
        position: fixed;
        width: 100%;
        height: 60%;
        bottom: 0;
        z-index: 100;
        border-top: 3px solid rgba(255, 255, 255, 0.2);
    }

    .mini-poster {
        bottom: 10px;
        right: 10px;
        width: 60px;
        height: 80px;
        font-size: 0.7em;
    }

    .message-content {
        max-width: 90%;
        font-size: 17px;
        padding: 16px 20px;
        line-height: 1.5;
    }

    .home-btn {
        top: 65px; /* Move entire button down to center within blue container */
        transform: translateY(-50%);
        left: 10px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        z-index: 1300;
        background: #FFFFFF; /* Clean white background */
        border: 2px solid #1a237e; /* Blue border to match header */
        box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
        position: fixed; /* Ensure it stays in position */
    }

    .home-btn span {
        font-size: 1.4rem;
        color: #1a237e; /* Blue color to match header */
    }

    .chat-header {
        padding: 8px 10px;
        position: relative;
    }
    
    /* Remove decorative elements on mobile */
    .chat-header::after {
        display: none;
    }
    
    /* More compact header content */
    .chat-header-content {
        gap: 8px;
        margin-top: 4px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    /* Optimized village badge for mobile spatial hierarchy */
    .village-badge {
        padding: 8px 16px;
        font-size: 0.85em;
        margin-bottom: 16px;
        border-radius: 20px;
        /* Consistent mobile spatial optimization */
    }

    .chat-title {
        font-size: 1.1em;
        font-weight: 600;
        line-height: 1.2;
    }

    /* KITCHEN HEADER - OPTIMIZED MOBILE SPATIAL LAYOUT */
    .kitchen-header {
        margin: 0 10px;
        max-width: calc(100vw - 20px);
        padding: 20px 15px;
        border-radius: 12px;
        /* Enhanced mobile spacing for better visual hierarchy */
    }
    
    /* Remove decorative elements on mobile */
    .kitchen-header::after {
        display: none;
    }

    .kitchen-header-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
        max-width: none;
        padding: 0;
        /* Optimized mobile centering */
    }

    .kitchen-title {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Hide navigation buttons on mobile - only use toggle buttons */
    .kitchen-nav-btn,
    .chat-nav-btn {
        display: none !important;
    }
    
    .kitchen-btn-icon,
    .chat-btn-icon {
        font-size: 14px;
    }
    
    /* Compact input area */
    .chat-input {
        padding: 10px;
        min-height: 50px;
    }

    .chat-input input {
        font-size: 17px;
        padding: 14px 18px;
        min-height: 52px;
    }

    .chat-input button {
        font-size: 17px;
        padding: 14px 20px;
        min-height: 52px;
    }
}

/* Hide video background when main interface is active */
#welcome-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 900;
    pointer-events: none;
    transition: opacity 0.7s ease;
    opacity: 1;
    filter: brightness(0.7) blur(0px);
}

#welcome-video.fade-out,
#welcome-video.hidden {
    opacity: 0;
    transition: opacity 0.7s;
}

#welcome-video.hidden {
    display: none;
}

#video-dim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    pointer-events: none;
}

#video-dim.hidden {
    display: none;
}

#show-invite-btn {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.7s ease;
}

#show-invite-btn.fade-out {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.95);
}

.envelope {
    position: relative;
    width: 220px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: perspective(1000px) rotateX(5deg);
    transition: all 0.3s ease;
}

.envelope-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fefefe 0%, #f8f8f8 100%);
    border-radius: 3px;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.08);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    clip-path: polygon(0 0, 50% 70%, 100% 0);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 2;
    /* Thicker, more visible gold border */
    border-top: 3px solid #d4af37;
    border-left: 3px solid #d4af37;
    border-right: 3px solid #d4af37;
    /* Add gold gradient for richer appearance */
    position: relative;
    transition: all 0.3s ease;
}

/* Add shimmering gold outline effect */
.envelope-flap::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    height: 75%;
    background: none;
    border-top: 1px solid #f4e4bc;
    border-left: 1px solid #f4e4bc;
    border-right: 1px solid #f4e4bc;
    clip-path: polygon(0 0, 50% 70%, 100% 0);
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* Enhanced gold accent line on flap fold */
.envelope-flap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right,
            transparent 0%,
            #f4e4bc 10%,
            #d4af37 20%,
            #b8941f 50%,
            #d4af37 80%,
            #f4e4bc 90%,
            transparent 100%);
    box-shadow: 0 1px 3px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
}

/* Add gold corner accents */
.envelope-body::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid #f4e4bc;
    border-radius: 3px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

/* Enhanced hover effect to highlight gold */
#show-invite-btn:hover .envelope-flap {
    border-color: #b8941f;
    filter: brightness(1.05);
}

#show-invite-btn:hover .envelope-flap::before {
    opacity: 0.8;
    border-color: #ffd700;
}

#show-invite-btn:hover .envelope-flap::after {
    height: 5px;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.6);
}

.wax-seal {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: radial-gradient(circle at 40% 40%,
            #ff6b6b 0%,
            #dc3545 40%,
            #b91c1c 80%,
            #991b1b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 3px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: all 0.3s ease;
}

/* Subtle wax texture */
.wax-seal::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 25%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 70%);
    border-radius: 50%;
}

/* Single elegant wax drip */
.wax-seal::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 10px;
    background: linear-gradient(to bottom, #dc3545, #b91c1c);
    border-radius: 0 0 50% 50%;
    box-shadow:
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.wax-b {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 22px;
    color: #ffd700;
    font-weight: bold;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(255, 215, 0, 0.3);
    line-height: 1;
    z-index: 2;
}

/* Hover effect */
#show-invite-btn:hover .envelope {
    transform: perspective(1000px) rotateX(3deg) scale(1.02);
}

#show-invite-btn:hover .wax-seal {
    box-shadow:
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        inset 0 2px 3px rgba(255, 255, 255, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.envelope-label {
    font-family: 'Jua', sans-serif;
    font-size: 18px;
    color: #8b0000;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 24px;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    font-weight: 600;
}

/* Loading Styles */
#bitcoin-libraries-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bitcoin-libraries-loading>div {
    text-align: center;
    padding: 20px;
}

#main-content,
.main-container,
.mini-poster {
    display: none;
}

#main-content.active,
.main-container.active,
.mini-poster.active {
    display: flex !important;
}

/* Home Button Styles - Enhanced for Mobile Touch Targets */
.home-btn {
    position: fixed;
    top: 24px;
    left: 20px;
    z-index: 1200;
    width: 44px;
    /* Smaller size for better alignment */
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: #FFA500;
    /* Orange theme color */
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    border: 2px solid #FF8C00;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Jua', sans-serif;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.home-btn span {
    font-size: 1.6rem;
    line-height: 1;
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: none;
}

.home-btn:hover {
    /* Remove hover effects */
    transform: none;
    background: #FFA500;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
    border-color: #FF8C00;
}

.home-btn:hover span {
    /* Remove hover effects */
    transform: none;
    color: #FFFFFF;
}

.home-btn:active {
    /* Remove active effects */
    transform: none;
    box-shadow: 0 2px 8px rgba(255, 140, 0, 0.3);
}

.home-btn:focus {
    outline: 3px solid rgba(155, 89, 182, 0.8);
    outline-offset: 2px;
}

/* 홈 버튼 툴팁 */
.home-btn::after {
    content: '처음으로';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Jua', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin-bottom: 8px;
    z-index: 1201;
}

.home-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.home-btn[style*="display: block"] {
    animation: fadeIn 0.3s ease;
}

/* 모바일에서 홈 버튼 최적화 */
@media (max-width: 768px) {
    .home-btn {
        width: 48px;
        /* 모바일에서는 약간 작게 */
        height: 48px;
        min-width: 48px;
        /* 여전히 터치 최소 크기 충족 */
        min-height: 48px;
        top: 65px; /* Center within blue header container */
        left: 16px;
        background: #FFFFFF;
        border: 2px solid #1a237e;
        box-shadow: 0 2px 8px rgba(26, 35, 126, 0.3);
    }

    .home-btn::after {
        display: none;
        /* 모바일에서는 툴팁 숨김 */
    }

    .home-btn span {
        font-size: 1.6rem;
    }
}

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

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

/* 주방 섹션 */
.kitchen-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    /* Progress Bar 배치를 위해 추가 */
    overflow-y: auto;
    padding: 2rem;
    /* 원래 패딩으로 복원 */
}

.main-container.kitchen-only .kitchen-section {
    display: flex !important;
}

.main-container.kitchen-only .chat-section {
    display: flex !important;
}

.main-container.kitchen-only #show-invite-btn,
.main-container.kitchen-only #welcome-overlay {
    display: none !important;
}

/* Flexible layout overrides */
.main-container.flexible-layout .kitchen-section {
    display: flex !important;
}

.main-container.flexible-layout .chat-section {
    display: flex !important;
}

/* 애니메이션 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* 모바일 최적화 */
@media (max-width: 768px) {
    .kitchen-section {
        padding: 0.5rem 0;
        align-items: center;
        justify-content: flex-start;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .kitchen-content-wrapper {
        padding: 0.5rem;
        gap: 1rem;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin: 0 auto;
    }

    .cooking-steps {
        padding: 0.5rem;
        gap: 1rem;
        align-items: center;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin: 0 auto;
    }

    /* EXPAND GREEN CONTAINERS FOR MOBILE */
    .cooking-step {
        max-width: calc(100vw - 20px) !important;
        margin: 0 10px !important;
        padding: 1rem 0.5rem !important;
    }

    .cooking-step.active {
        border: 2px solid #4CAF50;
        border-radius: 8px;
    }

    /* COOKING STEP TITLES - ENHANCED FOR MOBILE */
    .cooking-step h2 {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }

    .step-description {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1.2rem !important;
        padding: 0 1rem !important;
        text-align: center !important;
    }

    .meat-selection,
    .vegetable-selection,
    .spice-selection,
    .bowl-selection {
        padding: 0;
        margin-bottom: 1.5rem;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin-left: auto;
        margin-right: auto;
    }

    .meat-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
        max-width: 100%;
        justify-items: center;
    }

    .meat-option {
        min-height: 120px;
        padding: 1rem;
        max-width: 100%;
    }

    .meat-emoji {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .meat-name {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .meat-description {
        font-size: 0.8rem;
    }

    .meat-visualization {
        height: 300px;
        padding: 0;
        /* 패딩 제거 */
        width: 100%;
        max-width: 100%;
        background: #000;
        /* 검정색 배경으로 통일 */
    }

    .cauldron-gif-container {
        position: relative;
        width: 100%;
        height: 100%;
        background: #000;
        /* 검정색 배경 */
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: -20px;
        /* 부모 컨테이너의 padding 상쇄 */
    }

    .cauldron-gif {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-width: 100%;
        max-height: 400px;
        /* 적절한 최대 높이 설정 */
    }

    .visualization-message {
        display: none !important;
        /* 제거 */
    }

    /* Allow graduation ceremony to display */
    .visualization-message .graduation-scroll {
        display: block !important;
        background: linear-gradient(145deg, #f4f1de, #e9c46a);
        border: 3px solid #8b4513;
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        max-width: 800px;
        margin: 20px auto;
        font-family: 'Jua', sans-serif;
    }

    .meat-selection-feedback {
        padding: 0;
        /* 패딩 제거 */
        width: 100%;
        max-width: 100%;
        background: #000;
        /* 검정색 배경으로 통일 */
        overflow: hidden;
    }
}

@media (max-width: 480px) {
    .meat-options {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        justify-items: center;
    }

    .meat-option {
        min-height: 100px;
        padding: 1rem;
        max-width: 100%;
    }

    .meat-visualization {
        height: 300px;
        padding: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .cauldron-gif-container {
        width: min(240px, 70vw);
        height: min(240px, 70vw);
        padding: 1rem;
        margin: 0 auto;
        aspect-ratio: 1;
    }
    
    .cauldron-gif {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        border-radius: 8px;
    }

    .visualization-message {
        font-size: 11px;
        padding: 8px 14px;
        bottom: -40px;
    }

    .meat-selection-feedback,
    .vegetable-selection-feedback,
    .spice-selection-feedback,
    .bowl-selection-feedback {
        padding: 0 1rem 1rem 1rem;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin: 0 auto;
    }

    .cauldron-container {
        width: 100%;
        max-width: 100%;
        padding: 1rem;
    }
}

/* DESKTOP LAYOUT - CONSOLIDATED RULES */
@media (min-width: 768px) {
    .main-container {
        flex-direction: row !important;
    }

    /* CHAT SECTION */
    .chat-section {
        width: 30%;
        flex-shrink: 0;
        border-right: 2px solid #333333;
        display: flex;
        flex-direction: column;
    }

    /* KITCHEN SECTION */
    .kitchen-section {
        width: 70%;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem;
        overflow-y: auto;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    }

    .kitchen-section.active {
        width: 70%;
        display: flex;
    }

    .kitchen-section.active~.chat-section {
        width: 30%;
    }

    /* Kitchen content layout */
    .kitchen-section .kitchen-content-wrapper {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        align-items: center;
        justify-content: flex-start;
    }

    .kitchen-section .cooking-steps {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        align-items: center;
        justify-content: flex-start;
    }

    .kitchen-section .meat-selection {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        align-items: center;
    }

    .kitchen-section .meat-options {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        padding: 1.5rem;
        gap: 1.5rem;
        justify-items: center;
    }

    .kitchen-section .meat-selection-feedback {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        align-items: center;
    }

    .kitchen-section .cauldron-container {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }

    .kitchen-section .meat-visualization {
        height: 450px;
        max-width: 600px;
    }
}

/* MOBILE LAYOUT - SINGLE VIEW ONLY */
@media (max-width: 767px) {
    .main-container {
        flex-direction: column !important;
    }

    /* MOBILE SECTIONS HIDDEN BY DEFAULT BUT ALLOW MOBILE MODES */
    .main-container:not(.mobile-chat-mode):not(.mobile-kitchen-mode) .chat-section,
    .main-container:not(.mobile-chat-mode):not(.mobile-kitchen-mode) .kitchen-section {
        display: none;
    }

    /* KITCHEN OPTIONS - EXPANDED 2x2 GRID FOR MOBILE */
    .meat-options,
    .spell-options,
    .vegetable-options,
    .spice-options,
    .bowl-options {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 1fr 1fr !important;
        gap: 12px !important;
        padding: 16px !important;
        max-width: 100% !important;
        width: 100% !important;
        justify-items: stretch !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
        place-items: center !important;
    }

    /* KITCHEN OPTION ITEMS - ENLARGED FOR MOBILE */
    .meat-option,
    .spell-option,
    .vegetable-option,
    .spice-option,
    .bowl-option {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
        padding: 12px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
        text-align: center !important;
        margin: 0 !important;
        position: relative !important;
    }

    /* KITCHEN OPTION EMOJIS - ENLARGED FOR MOBILE */
    .meat-emoji,
    .spell-emoji,
    .vegetable-emoji,
    .spice-emoji,
    .bowl-emoji {
        font-size: 2.5rem !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        transition: transform 0.2s ease !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* KITCHEN OPTION NAMES - CONSISTENT FOR MOBILE */
    .meat-name,
    .spell-name,
    .vegetable-name,
    .spice-name,
    .bowl-name {
        font-size: 0.95rem !important;
        margin: 8px 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        height: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* KITCHEN OPTION DESCRIPTIONS - CONSISTENT FOR MOBILE */
    .meat-description,
    .spell-description,
    .vegetable-description,
    .spice-description,
    .bowl-description {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-grow: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        overflow: hidden !important;
    }

    /* KITCHEN OPTION TEXT - ENLARGED FOR MOBILE */
    .meat-name,
    .spell-name,
    .vegetable-name,
    .spice-name,
    .bowl-name {
        font-size: 1.1rem !important;
        font-weight: bold !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
    }

    .meat-description,
    .spell-description,
    .vegetable-description,
    .spice-description,
    .bowl-description {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
    }

    /* MEAT VISUALIZATION - SMALLER ON MOBILE */
    .meat-visualization {
        height: 300px !important;
        padding: 1rem !important;
    }
}

/* Kitchen content styles */
.kitchen-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cooking steps - initially hidden */
.cooking-steps {
    display: none;
    animation: fadeInUp 0.8s ease-out;
}

.cooking-step {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.cooking-step.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease forwards;
    border: 2px solid #4CAF50;
}

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

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

.kitchen-inner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cooking-step h2 {
    color: #f4e8d0;
    font-size: 1.8em;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.cooking-step h3 {
    color: #f4e8d0;
    font-size: 1.3em;
    margin-bottom: 1rem;
    text-align: center;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.cooking-step p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1.1em;
    text-align: center;
    line-height: 1.6;
    width: 100%;
    max-width: 600px;
}

.step-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
    width: 100%;
    max-width: 600px;
}

/* Meat selection styles */
.meat-selection {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.meat-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    justify-items: center;
    align-items: start;
}

.meat-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    width: 100%;
    min-width: 180px;
    max-width: 250px;
    text-align: center;
    height: fit-content;
}

.meat-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.meat-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #9B59B6;
    background: rgba(155, 89, 182, 0.3);
}

.meat-option:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.meat-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.meat-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.meat-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
}

.meat-option:hover .meat-emoji {
    transform: scale(1.1);
}

.meat-selection-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0;
    /* 패딩 제거 */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #000;
    /* 검정색 배경으로 통일 */
    overflow: hidden;
}

.meat-visualization {
    height: 300px;
    padding: 0;
    /* 패딩 제거 */
    width: 100%;
    max-width: 100%;
    background: #000;
    /* 검정색 배경으로 통일 */
}

/* cauldron-gif-container 확대 */
.cauldron-gif-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    /* 검정색 배경 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: -20px;
    /* 부모 컨테이너의 padding 상쇄 */
}

.cauldron-gif {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 100%;
    max-height: 400px;
    /* 적절한 최대 높이 설정 */
}

/* 전역 Progress Bar - 설명 텍스트와 선택 옵션 사이에 배치 */
.kitchen-global-progress {
    position: relative;
    /* absolute에서 relative로 변경 */
    margin: 1.5rem auto;
    /* 상하 여백으로 공간 확보 */
    width: 90%;
    /* 주방 페이지 너비에 맞춤 */
    max-width: 500px;
    /* 최대 너비 제한 */
    height: 30px;
    /* 높이 조정 */
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 0;
    /* 직사각형 모양 */
    overflow: hidden;
    z-index: 1000;
    /* 주방 페이지 내에서만 위에 표시 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: none;
    /* 기본적으로 숨김 */
}

.global-progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
            #ff6b35 0%,
            #ff9558 25%,
            #ffa947 50%,
            #ffb84d 75%,
            #ffc657 100%);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0;
    /* 직사각형 모양 */
    position: relative;
    box-shadow: 0 0 20px rgba(255, 155, 88, 0.5);
    animation: glow 2s infinite;
}

/* 기존 .meat-progress는 숨기거나 제거 */
.meat-progress {
    display: none;
}

/* 글로우 효과 */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 155, 88, 0.5);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 155, 88, 0.8), 0 0 40px rgba(255, 155, 88, 0.4);
    }

    100% {
        box-shadow: 0 0 20px rgba(255, 155, 88, 0.5);
    }
}

.meat-progress-bar {
    animation: glow 2s infinite;
}

/* 기존 progress bar 스타일 제거 */
.meat-progress-bar::after {
    display: none;
}

/* Spell selection styles */
.spell-selection {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spell-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    justify-items: center;
    align-items: start;
}

.spell-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    width: 100%;
    min-width: 180px;
    max-width: 250px;
    text-align: center;
    height: fit-content;
}

.spell-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.spell-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #9B59B6;
    background: rgba(155, 89, 182, 0.3);
}

.spell-option:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.spell-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.spell-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.spell-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
}

.spell-option:hover .spell-emoji {
    transform: scale(1.1);
}

.spell-selection-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.spell-visualization {
    height: 450px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Vegetable selection styles */
.vegetable-selection {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.vegetable-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    justify-items: center;
    align-items: start;
}

.vegetable-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    width: 100%;
    min-width: 180px;
    max-width: 250px;
    text-align: center;
    height: fit-content;
}

.vegetable-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.vegetable-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #9B59B6;
    background: rgba(155, 89, 182, 0.3);
}

.vegetable-option:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.vegetable-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.vegetable-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.vegetable-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
}

.vegetable-option:hover .vegetable-emoji {
    transform: scale(1.1);
}

.vegetable-selection-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.vegetable-visualization {
    height: 450px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Spice selection styles */
.spice-selection {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spice-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    justify-items: center;
    align-items: start;
}

.spice-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    width: 100%;
    min-width: 180px;
    max-width: 250px;
    text-align: center;
    height: fit-content;
}

.spice-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.spice-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #9B59B6;
    background: rgba(155, 89, 182, 0.3);
}

.spice-option:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.spice-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.spice-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.spice-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
}

.spice-option:hover .spice-emoji {
    transform: scale(1.1);
}

.spice-selection-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.spice-visualization {
    height: 450px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Bowl selection styles */
.bowl-selection {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.bowl-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    justify-items: center;
    align-items: start;
}

.bowl-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 140px;
    width: 100%;
    min-width: 180px;
    max-width: 250px;
    text-align: center;
    height: fit-content;
}

.bowl-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.bowl-option.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    border: 3px solid #9B59B6;
    background: rgba(155, 89, 182, 0.3);
}

.bowl-option:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.bowl-emoji {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.bowl-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.bowl-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.4;
}

.bowl-option:hover .bowl-emoji {
    transform: scale(1.1);
}

.bowl-selection-feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.bowl-visualization {
    height: 450px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid rgba(255, 215, 0, 0.1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.2),
        inset 0 0 20px rgba(255, 215, 0, 0.05);
}

/* Progress bar styles for all steps */
.meat-progress,
.spell-progress,
.vegetable-progress,
.spice-progress,
.bowl-progress {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.meat-progress-bar,
.spell-progress-bar,
.vegetable-progress-bar,
.spice-progress-bar,
.bowl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

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

/* Magical bubble animation for cauldron */
@keyframes magicalBubble {
    0% {
        transform: scale(0) translateY(0);
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(-20px);
        opacity: 0.8;
    }

    100% {
        transform: scale(0.5) translateY(-60px);
        opacity: 0;
    }
}

/* Flying emoji animation */
.flying-meat-emoji,
.flying-spell-emoji,
.flying-vegetable-emoji,
.flying-spice-emoji,
.flying-bowl-emoji {
    position: fixed;
    font-size: 3rem;
    z-index: 9999;
    pointer-events: none;
    transition: all 2.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Option click animation */
.meat-option.clicked,
.spell-option.clicked,
.vegetable-option.clicked,
.spice-option.clicked,
.bowl-option.clicked {
    animation: optionClickPulse 0.6s ease-in-out;
}

@keyframes optionClickPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

/* Error state styles */
.error-icon {
    font-size: 2rem;
    margin-right: 0.5rem;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {

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

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.retry-button {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 1rem;
    font-family: 'Jua', sans-serif;
    transition: all 0.3s ease;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Visualization message styles */
.visualization-message {
    background: rgba(0, 0, 0, 0.8);
    color: #FFD700;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 1rem;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: messageFadeIn 0.5s ease-in-out;
}

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

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

/* Kitchen Intro Section - Medieval Style */
.kitchen-intro {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    padding: 2rem;
    background: linear-gradient(135deg,
            #f4e8d0 0%,
            #f8f4e6 25%,
            #f4e8d0 50%,
            #f8f4e6 75%,
            #f4e8d0 100%);
    border: 8px solid #8b6914;
    border-radius: 15px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
    animation: introFadeIn 1.5s ease-out;
}

/* Removed animated gold border for cleaner design */

.intro-container {
    text-align: center;
    position: relative;
}

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

.intro-decoration-top,
.intro-decoration-bottom {
    font-size: 1.5rem;
    color: #8b6914;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: decorationFloat 4s ease-in-out infinite;
}

.intro-decoration-bottom {
    animation-delay: 2s;
}

.intro-title {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 2.2em;
    color: #8b0000;
    text-shadow: 3px 3px 0 #000, 0 0 10px rgba(139, 0, 0, 0.5);
    margin: 1rem 0;
    letter-spacing: 3px;
    animation: titleGlow 2s ease-in-out infinite;
}

.intro-story {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.7);
    border: 3px solid #8b6914;
    border-radius: 10px;
    box-shadow:
        inset 0 0 20px rgba(139, 105, 20, 0.1),
        0 5px 15px rgba(0, 0, 0, 0.2);
}

.story-scroll {
    position: relative;
    padding: 1rem;
}

.story-scroll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(139, 105, 20, 0.3), transparent);
    border-radius: 10px 10px 0 0;
}

.story-text {
    font-family: 'Jua', sans-serif;
    font-size: 1.3em;
    line-height: 1.8;
    color: #2c1810;
    text-align: left;
    margin: 0;
    animation: textReveal 2s ease-out;
}

.story-highlight {
    color: #8b0000;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.magic-text {
    color: #4b0082;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(75, 0, 130, 0.5);
    animation: magicPulse 2s ease-in-out infinite;
}

.gold-text {
    color: #b8860b;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: goldShimmer 3s ease-in-out infinite;
}

.intro-features {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #8b6914;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: featureFloat 3s ease-in-out infinite;
}

.feature-item:nth-child(2) {
    animation-delay: 1s;
}

.feature-item:nth-child(3) {
    animation-delay: 2s;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(139, 105, 20, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.feature-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.feature-text {
    font-family: 'Jua', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #8b0000;
}

.start-magic-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 32px;
    background: linear-gradient(135deg,
            #8b0000 0%,
            #b22222 25%,
            #8b0000 50%,
            #b22222 75%,
            #8b0000 100%);
    border: 4px solid #d4af37;
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Black Han Sans', sans-serif;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 25px rgba(139, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: buttonGlow 2s ease-in-out infinite;
}

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

.start-magic-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 12px 35px rgba(139, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    border-color: #ffd700;
}

.start-magic-btn:hover::before {
    left: 100%;
}

.start-magic-btn:active {
    transform: translateY(0) scale(1.02);
    box-shadow:
        0 4px 15px rgba(139, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.btn-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.btn-text {
    font-weight: bold;
    white-space: nowrap;
}

.btn-sparkle {
    font-size: 1.2rem;
    animation: sparkleTwinkle 1.5s ease-in-out infinite;
}

/* Satoshi Quotes Section Styling */
.satoshi-quotes-section {
    margin: 2.5rem 0;
    padding: 0;
}

.satoshi-attribution {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(178, 34, 34, 0.1));
    border: 2px solid #8b6914;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.2);
}

.attribution-text {
    font-family: 'Black Han Sans', sans-serif;
    font-size: 1.4em;
    color: #8b0000;
    text-shadow: 2px 2px 0 #000, 0 0 8px rgba(139, 0, 0, 0.5);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.attribution-name {
    font-family: 'Jua', sans-serif;
    font-size: 1.1em;
    color: #8b6914;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.quote-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #d4af37;
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.quote-item:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: #ffd700;
}

.quote-icon {
    font-size: 1.8rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.quote-text {
    font-family: 'Jua', sans-serif;
    font-size: 1.1em;
    line-height: 1.6;
    color: #2c1810;
    margin: 0;
    text-align: left;
    font-weight: 500;
}

/* Animations */
@keyframes introFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes decorationFloat {

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

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

@keyframes titleGlow {

    0%,
    100% {
        text-shadow: 3px 3px 0 #000, 0 0 10px rgba(139, 0, 0, 0.5);
    }

    50% {
        text-shadow: 3px 3px 0 #000, 0 0 20px rgba(139, 0, 0, 0.8);
    }
}

@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes magicPulse {

    0%,
    100% {
        text-shadow: 0 0 8px rgba(75, 0, 130, 0.5);
    }

    50% {
        text-shadow: 0 0 15px rgba(75, 0, 130, 0.8);
    }
}

@keyframes goldShimmer {

    0%,
    100% {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    50% {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px rgba(184, 134, 11, 0.6);
    }
}

@keyframes featureFloat {

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

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

@keyframes buttonGlow {

    0%,
    100% {
        box-shadow:
            0 8px 25px rgba(139, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow:
            0 8px 25px rgba(139, 0, 0, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    }
}

@keyframes sparkleTwinkle {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Additional animations for magic effects */
@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-50px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5);
    }
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes welcomeFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Responsive Design */
@media (max-width: 768px) {
    .kitchen-intro {
        padding: 1.5rem;
        margin: 3rem auto 3rem auto;
    }

    .intro-title {
        font-size: 1.8em;
        letter-spacing: 2px;
    }

    .story-text {
        font-size: 1.1em;
        line-height: 1.6;
    }

    .intro-features {
        flex-direction: column;
        gap: 0.8rem;
    }

    .feature-item {
        padding: 0.8rem;
    }

    .start-magic-btn {
        padding: 20px 40px;
        font-size: 1.3em;
        flex-direction: row;
        gap: 12px;
        width: 90%;
        max-width: 350px;
        margin: 2rem auto 0 auto;
        justify-content: center;
        min-height: 60px;
        box-shadow: 
            0 12px 35px rgba(139, 0, 0, 0.5),
            inset 0 2px 0 rgba(255, 255, 255, 0.4);
    }

    .btn-text {
        white-space: normal;
        text-align: center;
    }

    /* Mobile Satoshi Quotes Styling */
    .satoshi-quotes-section {
        margin: 2rem 0;
    }

    .satoshi-attribution {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .attribution-text {
        font-size: 1.2em;
        letter-spacing: 1px;
    }

    .attribution-name {
        font-size: 1em;
    }

    .quote-item {
        margin: 1rem 0;
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .quote-icon {
        font-size: 1.5rem;
        align-self: center;
        margin-top: 0;
    }

    .quote-text {
        font-size: 1em;
        line-height: 1.5;
        text-align: center;
    }
}

/* Pulse 애니메이션 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* 진행률 바 위에 단계 표시 점들 */
.progress-steps {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.progress-step-dot {
    position: absolute;
    width: 10px;
    /* 크기 조정 */
    height: 10px;
    /* 크기 조정 */
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0;
    /* 직사각형 점 */
    transition: all 0.3s ease;
}

.progress-step-dot.completed {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    /* 크기 조정 */
}

/* 각 단계 위치 */
.progress-step-dot:nth-child(1) {
    left: 20%;
}

.progress-step-dot:nth-child(2) {
    left: 40%;
}

.progress-step-dot:nth-child(3) {
    left: 60%;
}

.progress-step-dot:nth-child(4) {
    left: 80%;
}

.progress-step-dot:nth-child(5) {
    left: 100%;
    transform: translateX(-100%);
}

/* 모바일에서 Progress Bar 조정 */
@media (max-width: 768px) {
    .kitchen-global-progress {
        width: 95%;
        max-width: 400px;
        height: 25px;
        /* 모바일에서는 더 작게 */
        margin: 1rem auto;
        /* 모바일에서는 여백 조정 */
    }

    .progress-step-dot {
        width: 6px;
        /* 모바일에서는 더 작게 */
        height: 6px;
    }

    .progress-step-dot.completed {
        transform: scale(1.3);
    }
}

/* ADD graduation scroll styling */
.graduation-scroll {
    background: linear-gradient(145deg, #f4f1de, #e9c46a);
    border: 3px solid #8b4513;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Jua', sans-serif;
}

.scroll-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 20px;
}

.scroll-header h2 {
    color: #8b0000;
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.scroll-header p {
    color: #2c1810;
    font-size: 1.2em;
    font-weight: bold;
}

.recipe-recap h3 {
    color: #8b0000;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
}

.recipe-step {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 4px solid #9B59B6;
}

.step-visual {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: bold;
}

.ingredient {
    color: #8b0000;
    background: rgba(255, 215, 0, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
}

.arrow {
    color: #9B59B6;
    font-size: 1.2em;
    font-weight: bold;
}

.magic {
    color: #2c1810;
    background: rgba(155, 89, 182, 0.1);
    padding: 5px 10px;
    border-radius: 15px;
}

.technical-details {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.tech-label {
    color: #8b0000;
    font-weight: bold;
    margin-bottom: 5px;
}

.tech-data {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    flex-wrap: wrap;
}

.data-type {
    color: #2c1810;
    font-weight: bold;
}

.data-value {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
}

.copy-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 16px;
    /* Increased from 4px 8px for better touch targets */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
    min-height: 44px;
    /* Ensure minimum touch target height */
    min-width: 44px;
    /* Ensure minimum touch target width */
}

.copy-btn:hover {
    background: #2ecc71;
    transform: scale(1.05);
}

.tech-explanation {
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.final-wallet h3 {
    color: #8b0000;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    text-align: center;
}

.wallet-display {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid #8b4513;
}

.address-section,
.private-key-section {
    margin: 15px 0;
}

.address-section label,
.private-key-section label {
    display: block;
    color: #8b0000;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.value-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.value-container code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    flex: 1;
    min-width: 200px;
    word-break: break-all;
}

.reveal-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s ease;
}

.reveal-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.warning-section {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #FF0000;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #8B0000;
    text-align: center;
    font-weight: bold;
}

.achievements h3 {
    color: #8b0000;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    text-align: center;
}

.badge-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0;
    justify-content: center;
}

.badge {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    padding: 10px 15px;
    border-radius: 20px;
    color: #8b4513;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    border: 2px solid #8b4513;
    animation: badgeGlow 2s ease-in-out infinite;
}

@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 4px 20px rgba(255, 215, 0, 0.6);
    }
}

.next-actions h3 {
    color: #8b0000;
    font-size: 1.3em;
    margin: 25px 0 15px 0;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
    justify-content: center;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Jua', sans-serif;
    font-size: 0.9em;
    transition: all 0.3s ease;
    font-weight: bold;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn.primary {
    background: #4CAF50;
    color: white;
}

.action-btn.primary:hover {
    background: #45a049;
}

.action-btn {
    background: #9B59B6;
    color: white;
}

.action-btn:hover {
    background: #8e44ad;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .graduation-scroll {
        padding: 20px;
        margin: 10px;
    }

    .scroll-header h2 {
        font-size: 1.6em;
    }

    .step-visual {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .tech-data {
        flex-direction: column;
        align-items: flex-start;
    }

    .value-container {
        flex-direction: column;
        align-items: stretch;
    }

    .value-container code {
        min-width: auto;
    }

    .badge-container {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* 모바일에서 Progress Bar 조정 */

/* 🌐 Blockchain Explorer Section */
.blockchain-explorer-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #ff8c00;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(255, 140, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: explorerGlow 3s ease-in-out infinite alternate;
}

.blockchain-explorer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 140, 0, 0.1), transparent);
    animation: shimmer 2s infinite;
}

.blockchain-explorer-section h3 {
    color: #ff8c00;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.explorer-subtitle {
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
    opacity: 0.9;
}

.explorer-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #ff8c00;
    position: relative;
    overflow: hidden;
}

.explorer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.explorer-icon {
    font-size: 3em;
    background: linear-gradient(45deg, #ff8c00, #ff6b35);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.explorer-info h4 {
    color: #ff8c00;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.explorer-info p {
    color: #f0f0f0;
    margin-bottom: 15px;
    line-height: 1.5;
}

.explorer-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature {
    background: rgba(255, 140, 0, 0.1);
    color: #ff8c00;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid rgba(255, 140, 0, 0.3);
}

.address-preview {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 140, 0, 0.2);
}

.address-preview label {
    color: #ff8c00;
    font-weight: bold;
    display: block;
    margin-bottom: 8px;
}

.address-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.address-display code {
    background: rgba(255, 140, 0, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    flex: 1;
    min-width: 200px;
    word-break: break-all;
}

.address-status {
    color: #2ecc71;
    font-weight: bold;
    font-size: 0.9em;
}

.explorer-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Jua', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.explorer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
    background: linear-gradient(135deg, #ff9500 0%, #ff7a42 100%);
}

.explorer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 140, 0, 0.3);
}

.explorer-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.explorer-btn .btn-icon {
    margin-right: 8px;
}

.explorer-btn .btn-arrow {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.explorer-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.explorer-tooltip {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    color: #f0f0f0;
    font-size: 0.9em;
    line-height: 1.4;
}

.explorer-tooltip strong {
    color: #ff8c00;
}

/* Animations */
@keyframes explorerGlow {
    0% {
        box-shadow: 0 8px 32px rgba(255, 140, 0, 0.2);
    }

    100% {
        box-shadow: 0 8px 32px rgba(255, 140, 0, 0.4);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes spinning {
    0% {
        transform: rotate(0deg);
    }

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

.spinning {
    animation: spinning 1s linear infinite;
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Responsive for Explorer */
@media (max-width: 768px) {
    .blockchain-explorer-section {
        margin: 15px 0;
        padding: 20px;
    }

    .explorer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .explorer-features {
        justify-content: center;
    }

    .address-display {
        flex-direction: column;
        align-items: stretch;
    }

    .address-display code {
        min-width: auto;
        text-align: center;
    }

    .explorer-btn {
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* Loading State Styles */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    font-size: 2rem;
    animation: spinning 1s linear infinite;
}

.loading-message {
    color: #f4e8d0;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* =================================
   CREATIVE MOBILE UX SYSTEM
   ================================= */

/* Mobile View Toggle Controls */
@media screen and (max-width: 768px) {
    /* Hide long titles on mobile to prevent overlap */
    .chat-title,
    .kitchen-title {
        display: none !important;
    }
    
    /* Hide the original fixed toggle on mobile */
    .mobile-view-toggle:not(.mobile-header-toggle) {
        display: none !important;
    }
    
    /* Style mobile header toggle */
    .mobile-header-toggle {
        display: none; /* Initially hidden */
        visibility: hidden;
        opacity: 0;
        background: rgba(255, 255, 255, 0.95); /* Clean white background */
        border: 1px solid rgba(26, 35, 126, 0.3);
        border-radius: 15px;
        padding: 3px;
        gap: 4px;
        margin: 8px auto 0 auto;
        width: fit-content;
        align-self: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Show mobile header toggle when active */
    .main-container.active .mobile-header-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Style mobile header toggle buttons */
    .mobile-header-toggle .mobile-tab-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        min-height: 32px !important;
        min-width: 55px !important;
        background: transparent !important;
        color: #1a237e !important;
        border: none !important;
        border-radius: 12px !important;
        transition: all 0.2s ease !important;
    }
    
    /* Active state for toggle buttons */
    .mobile-header-toggle .mobile-tab-btn.active {
        background: #1a237e !important;
        color: #FFFFFF !important;
    }

    /* Show mobile controls when main container is active */
    .main-container.active~.mobile-view-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-tab-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 12px 16px;
        background: transparent;
        border: none;
        border-radius: 20px;
        color: rgba(255, 255, 255, 0.7);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        min-height: 48px;
        min-width: 70px;
        font-family: 'Jua', sans-serif;
    }

    .mobile-tab-btn.active {
        background: linear-gradient(135deg, #9B59B6, #8E44AD);
        color: white;
        box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
        transform: scale(1.05);
        font-weight: 700;
    }
    
    .mobile-tab-btn.active[data-mode="chat"] {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    }
    
    .mobile-tab-btn.active[data-mode="kitchen"] {
        background: linear-gradient(135deg, #e67e22, #f39c12);
        box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
    }

    .mobile-tab-btn:hover:not(.active) {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* MOBILE LAYOUT - CREATIVE UX/UI OPTIMIZED */

    /* Mobile sections with smooth transitions */
    @media screen and (max-width: 768px) {
        .main-container .chat-section,
        .main-container .kitchen-section {
            transition: all 0.3s ease-in-out !important;
        }
    }

    /* FULL SCREEN CHAT MODE - ENTIRE VIEWPORT */
    .main-container.active.mobile-chat-mode .chat-section {
        height: 100vh !important;
        width: 100vw !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1000 !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        background: #000000 !important;
    }

    .main-container.mobile-chat-mode .kitchen-section {
        display: none !important;
    }

    /* FULL SCREEN KITCHEN MODE - ENTIRE VIEWPORT */
    .main-container.active.mobile-kitchen-mode .kitchen-section {
        height: 100vh !important;
        width: 100vw !important;
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 1000 !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        overflow-y: auto;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    }

    .main-container.mobile-kitchen-mode .chat-section {
        display: none !important;
    }

    /* NO SPLIT MODE ON MOBILE - Remove entirely */

    /* Enhanced chat messages for full-screen mobile mode */
    .main-container.mobile-chat-mode .chat-messages {
        height: calc(100vh - 140px) !important;
        max-height: calc(100vh - 140px) !important;
        padding: 60px 16px 80px 16px !important; /* Top padding for toggle bar, bottom for input */
        font-size: 16px !important;
        line-height: 1.5 !important;
        overflow-y: auto !important;
    }

    /* Ensure chat input is visible in chat mode */
    .main-container.mobile-chat-mode .chat-input {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1500 !important;
    }
    
    /* Improved message bubbles for mobile */
    @media screen and (max-width: 768px) {
        .message {
            margin-bottom: 16px !important;
            padding: 12px 16px !important;
            border-radius: 18px !important;
            max-width: 85% !important;
            font-size: 16px !important;
            line-height: 1.6 !important;
        }
        
        .message-content {
            word-wrap: break-word;
            hyphens: auto;
        }
        
        .chat-input {
            padding: 12px 16px !important;
            background: rgba(0, 0, 0, 0.95) !important;
            position: fixed !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 1500 !important;
            display: flex !important;
            gap: 12px !important;
            border-top: 2px solid #333 !important;
        }
        
        .chat-input input {
            font-size: 16px !important;
            padding: 12px 16px !important;
            border-radius: 25px !important;
            flex: 1 !important;
            border: 2px solid #555 !important;
            background: #222 !important;
            color: white !important;
            min-height: 44px !important;
        }
        
        .chat-input button {
            padding: 12px 20px !important;
            font-size: 16px !important;
            border-radius: 25px !important;
            background: linear-gradient(135deg, #9B59B6, #8E44AD) !important;
            color: white !important;
            border: none !important;
            min-height: 44px !important;
            min-width: 80px !important;
            cursor: pointer !important;
        }
    }

    /* Full-screen kitchen mode styling */
    .main-container.mobile-kitchen-mode .kitchen-section {
        padding-top: 80px !important; /* Space for top toggle bar */
    }
    
    .main-container.mobile-kitchen-mode .cooking-step {
        padding: 16px;
        margin-bottom: 20px;
    }

    .main-container.mobile-kitchen-mode .cooking-step h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
}


/* Mobile Gesture Hint */
@media screen and (max-width: 768px) {
    .mobile-gesture-hint {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1998;
        background: rgba(0, 0, 0, 0.8);
        color: white;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 12px;
        animation: fadeInOut 5s ease forwards;
        pointer-events: none;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Mobile Layout - True Single View Only */
@media screen and (max-width: 767px) {
    .main-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        position: relative;
    }

    /* HIDE SECTIONS BY DEFAULT BUT ALLOW MOBILE MODES TO OVERRIDE */
    .main-container:not(.mobile-chat-mode):not(.mobile-kitchen-mode) .chat-section,
    .main-container:not(.mobile-chat-mode):not(.mobile-kitchen-mode) .kitchen-section {
        display: none !important;
    }

    .chat-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .chat-input {
        flex-shrink: 0;
        padding: 12px;
        min-height: 68px;
    }

    .chat-input input {
        padding: 12px 16px;
        font-size: 16px;
        /* Prevent zoom on iOS */
        border-radius: 24px;
        min-height: 48px;
    }

    .chat-input button {
        min-width: 60px;
        min-height: 48px;
        border-radius: 24px;
        padding: 12px 16px;
    }
}

/* Selection Box Uniformity - Force single line text and consistent sizing */
.meat-name,
.spell-name,
.vegetable-name,
.spice-name,
.bowl-name {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: #fff !important;
    text-align: center !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
    min-height: 1.43em !important;
}

/* Ensure all selection options have identical dimensions */
.meat-option,
.spell-option,
.vegetable-option,
.spice-option,
.bowl-option {
    min-height: 140px !important;
    height: fit-content !important;
    width: 100% !important;
    min-width: 180px !important;
    max-width: 250px !important;
    padding: 1.5rem !important;
    box-sizing: border-box !important;
}

/* DEFINITIVE MOBILE GRID FIX - Highest Specificity Override */
@media screen and (max-width: 850px) {
    /* FORCE PERFECT 2x2 GRID - Override ALL other rules */
    body .main-container .kitchen-section .meat-options,
    body .main-container .kitchen-section .spell-options,
    body .main-container .kitchen-section .vegetable-options,
    body .main-container .kitchen-section .spice-options,
    body .main-container .kitchen-section .bowl-options {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 1fr 1fr !important;
        gap: 15px !important;
        padding: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        justify-items: center !important;
        align-items: center !important;
        place-items: center !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
        justify-content: center !important;
        align-content: center !important;
    }
    
    /* FORCE IDENTICAL CARD DIMENSIONS - Maximum specificity */
    body .main-container .kitchen-section .meat-option,
    body .main-container .kitchen-section .spell-option,
    body .main-container .kitchen-section .vegetable-option,
    body .main-container .kitchen-section .spice-option,
    body .main-container .kitchen-section .bowl-option {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
        width: 100% !important;
        max-width: 160px !important;
        min-width: 140px !important;
        padding: 12px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        position: static !important;
        border-radius: 12px !important;
        text-align: center !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
    
    /* FORCE IDENTICAL CONTENT LAYOUT */
    body .main-container .kitchen-section .meat-emoji,
    body .main-container .kitchen-section .spell-emoji,
    body .main-container .kitchen-section .vegetable-emoji,
    body .main-container .kitchen-section .spice-emoji,
    body .main-container .kitchen-section .bowl-emoji {
        font-size: 2.2rem !important;
        margin: 0 0 8px 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        line-height: 1 !important;
        transform: none !important;
        display: block !important;
    }
    
    body .main-container .kitchen-section .meat-name,
    body .main-container .kitchen-section .spell-name,
    body .main-container .kitchen-section .vegetable-name,
    body .main-container .kitchen-section .spice-name,
    body .main-container .kitchen-section .bowl-name {
        font-size: 0.9rem !important;
        margin: 0 0 6px 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        text-align: center !important;
        line-height: 1.1 !important;
        display: block !important;
    }
    
    body .main-container .kitchen-section .meat-description,
    body .main-container .kitchen-section .spell-description,
    body .main-container .kitchen-section .vegetable-description,
    body .main-container .kitchen-section .spice-description,
    body .main-container .kitchen-section .bowl-description {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 1 1 auto !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        word-break: keep-all !important;
    }
    
    /* REMOVE ALL TRANSFORMS THAT COULD CAUSE MISALIGNMENT */
    body .main-container .kitchen-section .meat-option:hover,
    body .main-container .kitchen-section .spell-option:hover,
    body .main-container .kitchen-section .vegetable-option:hover,
    body .main-container .kitchen-section .spice-option:hover,
    body .main-container .kitchen-section .bowl-option:hover {
        transform: none !important;
    }
    
    body .main-container .kitchen-section .meat-option:active,
    body .main-container .kitchen-section .spell-option:active,
    body .main-container .kitchen-section .vegetable-option:active,
    body .main-container .kitchen-section .spice-option:active,
    body .main-container .kitchen-section .bowl-option:active {
        transform: none !important;
    }
}

/* Small mobile uniformity */
@media screen and (max-width: 480px) {
    .meat-option,
    .spell-option,
    .vegetable-option,
    .spice-option,
    .bowl-option {
        min-height: 100px !important;
        padding: 1rem !important;
        max-width: 100% !important;
    }
}

/* Graduation Scroll Container - Bitcoin Address/Key Display Fix */
.graduation-scroll-container {
    font-family: 'Jua', sans-serif;
}

.graduation-scroll-container .value-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.graduation-scroll-container code {
    font-family: 'Courier New', 'Monaco', monospace;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #000;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    max-width: 100%;
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.graduation-scroll-container .address-section code,
.graduation-scroll-container .private-key-section code {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile responsive text sizing */
@media screen and (max-width: 768px) {
    .graduation-scroll-container {
        width: 95%;
        max-width: 95%;
        padding: 15px;
    }
    
    .graduation-scroll-container code {
        font-size: 10px;
        padding: 6px 8px;
        line-height: 1.3;
    }
    
    .graduation-scroll-container .value-container {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .graduation-scroll-container .copy-btn,
    .graduation-scroll-container .reveal-btn {
        font-size: 11px;
        padding: 6px 10px;
        margin-top: 4px;
        align-self: flex-start;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    .graduation-scroll-container {
        width: 98%;
        max-width: 98%;
        padding: 10px;
        font-size: 13px;
    }
    
    .graduation-scroll-container code {
        font-size: 9px;
        padding: 4px 6px;
        word-break: break-all;
        hyphens: auto;
    }
    
    .graduation-scroll-container h2 {
        font-size: 16px;
        text-align: center;
    }
    
    .graduation-scroll-container h3 {
        font-size: 14px;
    }
}