@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    --bg-color: #F0F2F5;
    /* 부드러운 중간 톤 배경 */
    --text-color: #1A1A1A;
    /* 진한 텍스트 */
    --nav-bg: #1A1A1A;
    /* 하단 바 배경 (진한 색) */
    --nav-text: #FFFFFF;
    /* 하단 바 텍스트/아이콘 (흰색) */
    --accent-color: #27AE60;
    /* 강조 색상 */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Kiosk Global Overrides */
body {
    font-family: 'Pretendard', sans-serif;
    background-color: #F0F2F5;
    color: #1A1A1A;
    font-weight: 700;
    /* Bold default */
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* AI Status Bar */
.ai-status-bar {
    background: #1A1A1A;
    color: #00FF88;
    /* Cyber Green */
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 900;
    position: sticky;
    top: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ai-pulse {
    width: 8px;
    height: 8px;
    background-color: #00FF88;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 255, 136, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
    }
}

/* Kiosk Grid System */
.kiosk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Column Fixed */
    gap: 20px;
    padding: 10px;
}

/* Kiosk Card */
.kiosk-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 0px #DDDDDD;
    /* Blocky Shadow */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 180px;
    /* Fixed Height for Uniformity */
    position: relative;
    border: 3px solid transparent;
    transition: transform 0.1s, border-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.kiosk-card:active {
    transform: translateY(4px);
    box-shadow: 0 4px 0px #DDDDDD;
}

.kiosk-card.highlight {
    border-color: #1A1A1A;
}

/* AI Badge */
.ai-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #1A1A1A;
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}

/* 메인 컨테이너 */
.main-container {
    flex: 1;
    padding: 20px;
    padding-bottom: 16vh;
    /* 하단 바 높이 + 여백 */
    max-width: 600px;
    /* 모바일/키오스크 최적화 */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* 헤더 */
.sticky-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-color);
    z-index: 50;
    padding: 20px 0;
    margin-bottom: 20px;
}

.app-title {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
}

/* 페이지 헤더 (카드 형태) */
.page-header {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px var(--shadow-color);
}

.current-menu-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
}

/* 로그인 박스 */
.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* 입체감 강화 */
    text-align: center;
    margin: 20px 0;
}

.login-input,
.input-field {
    width: 100%;
    padding: 18px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.login-input:focus,
.input-field:focus {
    border-color: var(--nav-bg);
    outline: none;
}

/* 버튼 스타일 */
.main-btn {
    background-color: var(--nav-bg);
    color: white;
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.main-btn:active {
    transform: scale(0.98);
}

/* 하단 네비게이션 바 (핵심) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    /* 화면 높이의 15% */
    min-height: 100px;
    background-color: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    padding-bottom: env(safe-area-inset-bottom);
    /* 아이폰 하단 바 대응 */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--nav-text);
    text-decoration: none;
    flex: 1;
    height: 100%;
}

.nav-icon {
    font-size: 40px;
    /* 아이콘 크기 확대 */
    margin-bottom: 8px;
}

.nav-text {
    font-size: 18px;
    /* 텍스트 크기 확대 */
    font-weight: 700;
}

/* 유틸리티 */
.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px var(--shadow-color);
}

/* Hanok Gate Overlay */
#hanok-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent; 
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.8s ease-in-out, opacity 0.8s ease-in-out;
    perspective: 1500px; /* Essential for 3D swing */
    overflow: hidden;
}

.gate-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 10, 10, 0.98); /* dark backdrop that fades */
    transition: background-color 1.5s ease-in-out;
}

.gate-wrapper.opened {
    background-color: transparent;
}

.gate-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
}

.gate-half {
    width: 50%;
    height: 100%;
    background-image: url('/static/images/hanok_gate.png');
    background-size: 200% 100%; /* Stretch to cover both doors perfectly */
    background-repeat: no-repeat;
    position: relative;
    transition: transform 1.8s cubic-bezier(0.2, 0.9, 0.3, 1);
    z-index: 2;
    transform-style: preserve-3d;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5); /* Slight shadow inner depth */
}

/* Hide CSS handles/patterns as the generated image provides realistic details */
.door-pattern, .gate-handle {
    display: none;
}

.gate-left {
    transform-origin: left center;
    background-position: left center;
    border-right: 3px solid #000; /* Distinct center split */
}

.gate-right {
    transform-origin: right center;
    background-position: right center;
    border-left: 3px solid #000; /* Distinct center split */
}

.gate-intro {
    position: absolute;
    z-index: 10;
    text-align: center;
    color: #fff;
    pointer-events: auto; /* Allows clicking the button */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: fadeInIntro 1s ease-in-out;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.gate-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    color: #ffd700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

.gate-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 30px 0;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.gate-open-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    color: white;
    border: none;
    padding: 16px 45px;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 35px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: -0.5px;
}

.gate-open-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Animations */
@keyframes fadeInIntro {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Open State */
.gate-wrapper.opened .gate-left {
    transform: rotateY(-110deg);
}

.gate-wrapper.opened .gate-right {
    transform: rotateY(110deg);
}

.gate-wrapper.opened .gate-intro {
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

/* ============================================
   Premium Dashboard Design System (Glassmorphism & Sleek)
   ============================================ */

/* Main Container Background */
.premium-dashboard {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    font-family: 'Noto Sans KR', sans-serif;
    color: #1e293b;
    padding: 20px;
}

/* Premium Card (Glassmorphism) */
.premium-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05); /* Soft, elegant shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.premium-card-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 15px;
}

.premium-card-desc {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Premium Button (Dark gradient with hover effect) */
.premium-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(30, 60, 114, 0.3);
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.premium-btn:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
    transform: translateY(-2px);
}

.premium-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(30, 60, 114, 0.3);
}

/* Premium Insight Section (VIP) */
.premium-insight-card {
    background: linear-gradient(145deg, #18181b, #27272a);
    color: #f8fafc;
    border-radius: 20px;
    border: 1px solid #3f3f46;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.premium-insight-header {
    display: inline-block;
    background: linear-gradient(90deg, #d4af37, #fde08b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.insight-data-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.premium-badge {
    background: #d4af37;
    color: #1a1a1a;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 900;
    display: inline-block;
    margin-bottom: 15px;
}

.gold-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b58d24 100%);
    color: #000;
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.3);
}
.gold-btn:hover {
    background: linear-gradient(135deg, #fde08b 0%, #d4af37 100%);
    color: #000;
}