/* ========================================
   키오스크 시뮬레이터 - 디자인 시스템
   ======================================== */

:root {
    /* Color Palette */
    --primary: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --success-light: #4ade80;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-light: #fca5a5;

    /* Hospital Theme */
    --hospital-primary: #0891b2;
    --hospital-secondary: #06b6d4;
    --hospital-bg: linear-gradient(135deg, #ecfeff 0%, #cffafe 50%, #a5f3fc 100%);
    --hospital-accent: #155e75;

    /* McDonald's Theme */
    --mcd-primary: #da291c;
    --mcd-secondary: #ffc72c;
    --mcd-bg: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
    --mcd-green: #264f36;
    --mcd-dark: #27251f;

    /* Parking Theme */
    --parking-primary: #7c3aed;
    --parking-secondary: #a78bfa;
    --parking-bg: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 50%, #c4b5fd 100%);
    --parking-accent: #4c1d95;

    /* Neutral */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Spacing */
    --space-xs: 2px;
    --space-sm: 4px;
    --space-md: 8px;
    --space-lg: 12px;
    --space-xl: 16px;
    --space-2xl: 24px;

    /* Typography */
    --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 22px;
    --font-size-3xl: 28px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ======== Reset & Base ======== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
    min-height: 100vh;
    overflow-x: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* ======== App Container ======== */
#app {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    background: var(--surface);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ======== Header ======== */
#main-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    padding: var(--space-sm) var(--space-md);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#main-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: headerPulse 4s ease-in-out infinite;
}

@keyframes headerPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-subtitle {
    font-size: var(--font-size-xs);
    opacity: 0.9;
    font-weight: 300;
}

/* ======== Tab Navigation ======== */
#tab-nav {
    display: flex;
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-sm);
    background: transparent;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-btn .tab-icon {
    font-size: 18px;
    transition: transform var(--transition-normal);
}

.tab-btn:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.tab-btn:hover .tab-icon {
    transform: scale(1.15);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(37, 99, 235, 0.04);
}

.tab-btn.active .tab-icon {
    transform: scale(1.1);
}

/* Tab theme colors */
.tab-btn[data-tab="hospital"].active {
    color: var(--hospital-primary);
    border-bottom-color: var(--hospital-primary);
    background: rgba(8, 145, 178, 0.04);
}

.tab-btn[data-tab="mcdonald"].active {
    color: var(--mcd-primary);
    border-bottom-color: var(--mcd-primary);
    background: rgba(218, 41, 28, 0.04);
}

.tab-btn[data-tab="parking"].active {
    color: var(--parking-primary);
    border-bottom-color: var(--parking-primary);
    background: rgba(124, 58, 237, 0.04);
}

/* ======== Progress Bar ======== */
#progress-container {
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}

.progress-bar {
    height: 5px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    width: 0%;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* ======== Kiosk Screen ======== */
#kiosk-screen {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

.kiosk-content {
    display: none;
    padding: var(--space-md);
    animation: fadeIn 0.4s ease;
}

.kiosk-content.active {
    display: block;
}

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

/* ======== 공통 키오스크 UI 컴포넌트 ======== */

/* 키오스크 제목 */
.kiosk-title {
    font-size: var(--font-size-xl);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--space-sm);
    line-height: 1.3;
}

.kiosk-subtitle {
    font-size: var(--font-size-md);
    font-weight: 500;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* 큰 아이콘 */
.kiosk-icon {
    font-size: 36px;
    text-align: center;
    margin-bottom: var(--space-sm);
    animation: bounce 2s infinite;
}

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

/* 안내 박스 */
.guide-box {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    position: relative;
}

.guide-box.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
}

.guide-box.success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #4ade80;
}

.guide-box .guide-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.guide-box .guide-text {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.guide-box .guide-sub {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: 2px;
}

/* 큰 버튼 */
.big-btn {
    display: block;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.big-btn:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.big-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.big-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

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

.big-btn.success {
    background: linear-gradient(135deg, var(--success), #15803d);
    color: white;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.big-btn.danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.big-btn.secondary {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.big-btn + .big-btn {
    margin-top: var(--space-sm);
}

/* 숫자 키패드 */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 280px;
    margin: 0 auto var(--space-md);
}

.numpad-btn {
    aspect-ratio: 1.6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text);
}

.numpad-btn:hover {
    background: var(--border-light);
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.numpad-btn:active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(0.95);
}

.numpad-btn.delete {
    background: #fef2f2;
    border-color: var(--danger-light);
    color: var(--danger);
    font-size: var(--font-size-lg);
}

.numpad-btn.confirm {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: white;
    font-size: var(--font-size-lg);
}

/* 입력 디스플레이 */
.input-display {
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--text);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-normal);
}

.input-display.focused {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-display .cursor {
    display: inline-block;
    width: 2px;
    height: 24px;
    background: var(--primary);
    animation: blink 1s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 확인 정보 카드 */
.info-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-normal);
}

.info-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.info-card .info-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0;
}

.info-card .info-value {
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--text);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

/* 카드 결제 애니메이션 */
.card-slot {
    width: 160px;
    height: 100px;
    margin: var(--space-md) auto;
    background: linear-gradient(135deg, #374151, #1f2937);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-slot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: #4b5563;
    transform: translateY(-50%);
}

.card-slot .slot-text {
    color: #9ca3af;
    font-size: var(--font-size-sm);
    font-weight: 500;
    z-index: 1;
}

.card-inserting {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: var(--radius-sm);
    animation: insertCard 2s ease-in-out infinite;
    box-shadow: var(--shadow-lg);
}

.card-inserting::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 22px;
    background: #fbbf24;
    border-radius: 4px;
}

@keyframes insertCard {
    0% { bottom: -60px; }
    40% { bottom: 20px; }
    60% { bottom: 20px; }
    100% { bottom: -60px; }
}

/* ======== 카카오톡 스타일 화면 ======== */
.kakao-screen {
    background: #b2c7d9;
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
}

.kakao-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: var(--space-sm);
}

.kakao-avatar {
    width: 30px;
    height: 30px;
    background: #fee500;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.kakao-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: #3b4045;
}

.kakao-bubble {
    background: white;
    border-radius: 0 12px 12px 12px;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-xs);
    max-width: 90%;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.kakao-bubble .highlight {
    background: #fee500;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.kakao-time {
    font-size: var(--font-size-xs);
    color: #636b73;
    margin-top: var(--space-xs);
}

/* ======== 메모장 스타일 ======== */
.memo-pad {
    background: #fffde7;
    border: 2px dashed #fbbf24;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    position: relative;
}

.memo-pad::before {
    content: '📝 메모';
    position: absolute;
    top: -10px;
    left: 12px;
    background: #fffde7;
    padding: 0 6px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #92400e;
}

.memo-pad .memo-text {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #92400e;
    text-align: center;
    letter-spacing: 4px;
}

/* ======== 음성 가이드 ======== */
.voice-guide {
    position: fixed;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 440px;
    width: calc(100% - 32px);
    background: linear-gradient(135deg, #1e293b, #334155);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    animation: slideUp 0.4s ease;
}

.voice-guide.hidden {
    display: none;
}

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.voice-icon {
    font-size: 20px;
    animation: pulse 1.5s infinite;
}

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

.voice-text {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.3;
}

/* ======== Bottom Navigation ======== */
#bottom-nav {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--surface);
    border-top: 2px solid var(--border);
    position: sticky;
    bottom: 0;
    z-index: 100;
    flex-shrink: 0;
}

.nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 600;
    background: var(--border-light);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.nav-btn:hover:not(:disabled) {
    background: var(--border);
    color: var(--text);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.nav-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* ======== Modal ======== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
    animation: modalFade 0.3s ease;
}

.modal-overlay.hidden {
    display: none;
}

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

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease;
}

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

.modal-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-md);
}

.modal-text {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.modal-btn {
    display: block;
    width: 100%;
    padding: var(--space-md);
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    transition: all var(--transition-normal);
}

.modal-btn:hover {
    background: var(--primary-dark);
}

/* ======== Success Overlay ======== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-lg);
}

.success-overlay.hidden {
    display: none;
}

.success-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    animation: bounce 1s infinite;
}

.success-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--success);
    margin-bottom: var(--space-md);
}

.success-message {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.success-btn {
    display: block;
    width: 100%;
    padding: var(--space-lg);
    font-size: var(--font-size-lg);
    font-weight: 700;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--success), #15803d);
    color: white;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
    transition: all var(--transition-normal);
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(22, 163, 74, 0.4);
}

/* ======== 맥도날드 전용 ======== */
.mcd-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.mcd-menu-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.mcd-menu-item:hover {
    border-color: var(--mcd-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.mcd-menu-item.selected {
    border-color: var(--mcd-primary);
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.15);
}

.mcd-menu-item .menu-emoji {
    font-size: 32px;
    margin-bottom: 2px;
}

.mcd-menu-item .menu-name {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0;
}

.mcd-menu-item .menu-price {
    font-size: var(--font-size-xs);
    color: var(--mcd-primary);
    font-weight: 600;
}

/* 맥도날드 카테고리 탭 */
.mcd-category-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: var(--space-md);
    overflow-x: auto;
    padding-bottom: 2px;
}

.mcd-cat-btn {
    flex-shrink: 0;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    background: var(--border-light);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.mcd-cat-btn.active {
    background: var(--mcd-primary);
    color: white;
    border-color: var(--mcd-primary);
}

/* 맥도날드 주문 요약 */
.mcd-order-summary {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.mcd-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    font-size: var(--font-size-sm);
}

.mcd-order-item .item-name {
    font-weight: 600;
}

.mcd-order-item .item-qty {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mcd-primary);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    transform: scale(1.1);
}

.mcd-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 2px solid rgba(0,0,0,0.1);
    margin-top: var(--space-sm);
}

.mcd-total .total-label {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.mcd-total .total-price {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--mcd-primary);
}

/* 먹고가기/포장 선택 */
.eat-choice {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.eat-choice-btn {
    padding: var(--space-lg);
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.eat-choice-btn:hover {
    border-color: var(--mcd-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.eat-choice-btn.selected {
    border-color: var(--mcd-primary);
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.15);
}

.eat-choice-btn .choice-icon {
    font-size: 36px;
    margin-bottom: var(--space-sm);
}

.eat-choice-btn .choice-label {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

/* ======== 주차정산 전용 ======== */
.parking-ticket {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 2px solid var(--parking-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
}

.parking-ticket .ticket-title {
    font-size: var(--font-size-xs);
    color: var(--parking-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
}

.parking-ticket .ticket-number {
    font-size: var(--font-size-2xl);
    font-weight: 900;
    color: var(--parking-accent);
    letter-spacing: 4px;
    margin-bottom: var(--space-sm);
}

.parking-ticket .ticket-info {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
}

.parking-fee-display {
    background: white;
    border: 2px solid var(--parking-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    margin-bottom: var(--space-md);
}

.parking-fee-display .fee-label {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.parking-fee-display .fee-amount {
    font-size: var(--font-size-2xl);
    font-weight: 900;
    color: var(--parking-primary);
}

.parking-fee-display .fee-detail {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* 차량번호 표시 */
.car-plate {
    background: linear-gradient(135deg, #1e3a5f, #0f172a);
    border: 2px solid #60a5fa;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    margin-bottom: var(--space-md);
}

.car-plate .plate-number {
    font-size: var(--font-size-xl);
    font-weight: 900;
    color: white;
    letter-spacing: 3px;
}

.car-plate .plate-label {
    font-size: var(--font-size-xs);
    color: #93c5fd;
    margin-top: var(--space-xs);
}

/* ======== 힌트 말풍선 ======== */
.hint-bubble {
    position: relative;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    animation: hintAppear 0.4s ease;
}

.hint-bubble::before {
    content: '💡 힌트';
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: #92400e;
    margin-bottom: 2px;
}

.hint-bubble .hint-text {
    font-size: var(--font-size-sm);
    color: #78350f;
    font-weight: 500;
    line-height: 1.4;
}

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

/* ======== 로딩 스피너 ======== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    gap: var(--space-md);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: var(--font-size-md);
    font-weight: 600;
    color: var(--text-secondary);
}

/* ======== 삼성페이 애니메이션 ======== */
.samsung-pay-area {
    width: 140px;
    height: 140px;
    margin: var(--space-md) auto;
    background: linear-gradient(135deg, #1a237e, #283593);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.samsung-pay-area:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(26, 35, 126, 0.4);
}

.samsung-pay-area .pay-icon {
    font-size: 32px;
    margin-bottom: 2px;
}

.samsung-pay-area .pay-text {
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.samsung-pay-area .pay-ripple {
    position: absolute;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: ripple 2s infinite;
}

.samsung-pay-area .pay-ripple:nth-child(1) {
    width: 120%;
    height: 120%;
    animation-delay: 0s;
}

.samsung-pay-area .pay-ripple:nth-child(2) {
    width: 140%;
    height: 140%;
    animation-delay: 0.5s;
}

.samsung-pay-area .pay-ripple:nth-child(3) {
    width: 160%;
    height: 160%;
    animation-delay: 1s;
}

@keyframes ripple {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

/* ======== 영수증 스타일 ======== */
.receipt {
    background: #fefce8;
    border: 1px dashed #d1d5db;
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-xs);
    margin-bottom: var(--space-md);
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.receipt .receipt-header {
    text-align: center;
    font-weight: 700;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-sm);
    padding-bottom: 2px;
    border-bottom: 1px dashed #9ca3af;
}

.receipt .receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.receipt .receipt-divider {
    border-top: 1px dashed #9ca3af;
    margin: var(--space-sm) 0;
}

.receipt .receipt-total {
    font-weight: 700;
    font-size: var(--font-size-md);
}

/* ======== 알림 뱃지 ======== */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: white;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    padding: 0 6px;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ======== Responsive ======== */
@media (max-width: 480px) {
    #app {
        max-width: 100%;
    }
    
    .header-content h1 {
        font-size: var(--font-size-lg);
    }
    
    .tab-btn .tab-label {
        font-size: 11px;
    }
}

/* ======== Theme-specific progress bar colors ======== */
.progress-fill.hospital {
    background: linear-gradient(90deg, var(--hospital-primary), var(--hospital-secondary));
}

.progress-fill.mcdonald {
    background: linear-gradient(90deg, var(--mcd-primary), var(--mcd-secondary));
}

.progress-fill.parking {
    background: linear-gradient(90deg, var(--parking-primary), var(--parking-secondary));
}

/* ======== 반짝이 효과 ======== */
.sparkle {
    position: relative;
}

.sparkle::after {
    content: '✨';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 16px;
    animation: sparkle 1.5s infinite;
}

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

/* ======== 체크마크 애니메이션 ======== */
.checkmark-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--space-md) auto;
    animation: checkPop 0.5s ease;
}

.checkmark-circle::after {
    content: '✓';
    color: white;
    font-size: 28px;
    font-weight: 900;
}

@keyframes checkPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ======== 맥도날드 세트 구성 ======== */
.set-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 3px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.set-option:hover {
    border-color: var(--mcd-primary);
    background: #fef2f2;
}

.set-option.selected {
    border-color: var(--mcd-primary);
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.15);
}

.set-option .option-icon {
    font-size: 24px;
}

.set-option .option-info {
    flex: 1;
}

.set-option .option-name {
    font-size: var(--font-size-md);
    font-weight: 600;
}

.set-option .option-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* 결제 방법 선택 */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.payment-method-btn {
    padding: var(--space-md) var(--space-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.payment-method-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-method-btn.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.payment-method-btn .method-icon {
    font-size: 28px;
    margin-bottom: 2px;
}

.payment-method-btn .method-name {
    font-size: var(--font-size-md);
    font-weight: 600;
}

/* ======== 주차 확인증 카드 삽입 안내 ======== */
.ticket-insert-area {
    width: 240px;
    height: 120px;
    margin: var(--space-xl) auto;
    background: linear-gradient(135deg, #4c1d95, #6d28d9);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.ticket-insert-area .insert-arrow {
    position: absolute;
    bottom: 0;
    font-size: 32px;
    animation: arrowUp 1.5s infinite;
}

@keyframes arrowUp {
    0%, 100% { transform: translateY(10px); opacity: 0.5; }
    50% { transform: translateY(-10px); opacity: 1; }
}

.ticket-insert-area .insert-text {
    color: white;
    font-size: var(--font-size-md);
    font-weight: 600;
    z-index: 1;
}

/* ======== 확대 콤보박스 ======== */
.zoom-control {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.zoom-control label {
    font-size: 14px;
    cursor: pointer;
}

.zoom-control select {
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 3px 4px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-normal);
    -webkit-appearance: auto;
    appearance: auto;
}

.zoom-control select:focus {
    border-color: var(--primary);
}

/* ======== QR코드 탭 테마 ======== */
.tab-btn[data-tab="qrcode"].active {
    color: #059669;
    border-bottom-color: #059669;
    background: rgba(5, 150, 105, 0.04);
}

/* QR코드 화면 스타일 */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) 0;
}

.qr-box {
    background: white;
    border: 3px solid #059669;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-box #qr-canvas {
    margin-bottom: var(--space-md);
}

.qr-box #qr-canvas img {
    border-radius: var(--radius-sm);
}

.qr-url-display {
    background: var(--border-light);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-xs);
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    word-break: break-all;
    text-align: center;
    max-width: 280px;
    margin-bottom: var(--space-md);
}

.qr-instructions {
    text-align: center;
    margin-top: var(--space-md);
}

.qr-instructions .qr-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.qr-instructions .qr-step .step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #059669;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: all var(--transition-normal);
}

.copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.copy-btn.copied {
    background: linear-gradient(135deg, var(--success), #15803d);
}
