@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css');

body {
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: linear-gradient(135deg, #fef3c7 0%, #fef3c7 50%, #fed7aa 100%);
    min-height: 100vh;
}

.font-serif {
    font-family: 'Noto Serif KR', serif;
}

.font-shin {
    font-family: 'Zhi Mang Xing', cursive;
}

.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.ingredient-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    animation: slideIn 0.3s ease-out;
}

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

.recipe-item {
    animation: fadeInUp 0.5s ease-out;
}

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

.tab-active {
    border-bottom: 3px solid #d97706;
    color: #d97706;
}

/* 요리하는 냄비 로딩 애니메이션 */
.cooking-pot {
    animation: potShake 0.5s ease-in-out infinite;
}

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

.steam {
    position: absolute;
    width: 8px;
    height: 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.1), rgba(255,255,255,0.6));
    border-radius: 50%;
    animation: steamRise 1.5s ease-out infinite;
    opacity: 0;
}

.steam:nth-child(1) { left: 25%; animation-delay: 0s; }
.steam:nth-child(2) { left: 50%; animation-delay: 0.3s; }
.steam:nth-child(3) { left: 75%; animation-delay: 0.6s; }

@keyframes steamRise {
    0% { transform: translateY(0) scaleX(1); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(-40px) scaleX(1.5); opacity: 0; }
}

.ingredient-bounce {
    position: absolute;
    font-size: 1.5rem;
    animation: ingredientJump 1s ease-in-out infinite;
}

.ingredient-bounce:nth-child(1) { left: 10%; animation-delay: 0s; }
.ingredient-bounce:nth-child(2) { left: 40%; animation-delay: 0.2s; }
.ingredient-bounce:nth-child(3) { left: 70%; animation-delay: 0.4s; }

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

.loading-message {
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.saved-recipe {
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

/* Toast 스타일 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

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

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

/* 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    animation: scaleIn 0.3s ease-out;
}

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

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

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

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

/* 사용량 배지 (印 인주도장) — 헌법 §12-A 표준. 정본: 2.계약서검토. */
.usage-badge { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; gap: 14px; align-items: center; padding: 14px 18px 14px 14px; background: var(--card, #FBF9F4); border: 1px solid var(--accent, #8B2520); border-radius: var(--radius-xs, 2px); box-shadow: var(--shadow-card, 0 1px 0 rgba(20,17,13,0.04), 0 8px 24px -12px rgba(20,17,13,0.10)); font-family: var(--font-serif, 'Noto Serif KR', 'MaruBuri', serif); color: var(--ink-soft, #3A352D); transition: var(--transition, all 0.25s cubic-bezier(0.2, 0.7, 0.2, 1)); background-image: linear-gradient(180deg, transparent 0%, rgba(20,17,13,0.015) 100%); }
.usage-badge[hidden] { display: none !important; }
.usage-badge__stamp { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--accent, #8B2520); color: var(--paper, #F4F1EA); border-radius: var(--radius-xs, 2px); transform: rotate(-3deg); box-shadow: inset 0 0 6px rgba(0,0,0,0.22), inset 1px 1px 0 rgba(255,255,255,0.08), 0 2px 4px rgba(139,37,32,0.28); position: relative; }
.usage-badge__stamp::after { content: ''; position: absolute; inset: -2px; border-radius: var(--radius-xs, 2px); background: var(--accent, #8B2520); opacity: 0.10; z-index: -1; filter: blur(2px); }
.usage-badge__stamp-char { font-family: var(--font-serif, 'Noto Serif KR', serif); font-size: 24px; font-weight: 700; line-height: 1; letter-spacing: -1px; text-shadow: 0 1px 1px rgba(0,0,0,0.25); }
.usage-badge__content { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.usage-badge__label { font-size: 12px; color: var(--ink-mute, #6B6358); letter-spacing: 0.08em; font-weight: 500; margin-bottom: 1px; }
.usage-badge__dots { display: flex; gap: 5px; margin: 2px 0 3px; flex-wrap: wrap; max-width: 180px; }
.usage-badge__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent, #8B2520); transition: background 0.4s ease, transform 0.3s ease; }
.usage-badge__dot--used { background: var(--rule-soft, #DDD5C2); }
.usage-badge__remaining { font-size: 13px; color: var(--ink-soft, #3A352D); line-height: 1.2; }
.usage-badge__remaining strong { font-size: 20px; font-weight: 700; color: var(--accent, #8B2520); margin-right: 3px; font-variant-numeric: tabular-nums; }
.usage-badge__reset { font-size: 10.5px; color: var(--ink-light, #9A8F80); letter-spacing: 0.04em; margin-top: 1px; }
.usage-badge--critical .usage-badge__stamp { animation: usage-stamp-pulse 2.2s ease-in-out infinite; }
.usage-badge--critical .usage-badge__dot:not(.usage-badge__dot--used) { background: var(--accent-deep, #6B1C18); }
.usage-badge--critical .usage-badge__remaining strong { color: var(--accent-deep, #6B1C18); }
@keyframes usage-stamp-pulse { 0%, 100% { transform: rotate(-3deg) scale(1); } 50% { transform: rotate(-3deg) scale(1.06); } }
.usage-badge--exhausted .usage-badge__stamp { opacity: 0.5; animation: none; }
.usage-badge--exhausted .usage-badge__dot { background: var(--rule-soft, #DDD5C2); }
.usage-badge--exhausted .usage-badge__remaining strong { color: var(--ink-light, #9A8F80); }
.usage-badge--warn { border-color: var(--warning, #946A1F); }
.usage-badge--warn .usage-badge__stamp { background: var(--warning, #946A1F); }
.usage-badge--warn .usage-badge__stamp::after { background: var(--warning, #946A1F); }
@media (max-width: 640px) { .usage-badge { top: 12px; right: 12px; padding: 10px 14px 10px 10px; gap: 10px; } .usage-badge__stamp { width: 38px; height: 38px; } .usage-badge__stamp-char { font-size: 19px; } .usage-badge__content { min-width: 100px; } .usage-badge__dot { width: 7px; height: 7px; } .usage-badge__remaining strong { font-size: 17px; } }
@media print { .usage-badge { display: none !important; } }
