/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --bg-primary: #0f172a;
    --bg-secondary: rgba(30, 41, 59, 0.75);
    --bg-tertiary: rgba(15, 23, 42, 0.7);
    --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    --accent-color: #ff6b6b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(10px);
    --box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.3);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Outfit', 'Noto Sans KR', sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 107, 107, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 142, 83, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    padding-bottom: 30px;
    line-height: 1.5;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* 컨테이너 */
.container {
    max-width: 1280px; /* 더 넓게 확장 */
    margin: 0 auto;
    padding: 12px 20px;
}
.container.container-ingredients {
    max-width: 98%;
    padding: 12px 10px;
}

/* 헤더 - 콤팩트화 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 22px; /* 축소 */
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logo i {
    font-size: 20px;
    color: var(--accent-color);
}

/* 히어로 보드 - 콤팩트화 */
.hero-board {
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px; /* 축소 */
    padding: 20px 30px; /* 대폭 축소 */
    text-align: center;
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.hero-board h1 {
    font-size: 26px; /* 축소 */
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-board p {
    color: var(--text-secondary);
    font-size: 14px; /* 축소 */
    max-width: 650px;
    margin: 0 auto 15px auto;
}

/* 탭 기능 스타일 */
.collect-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.tab-content {
    display: none;
}

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

/* 수집 폼 영역 - 콤팩트화 */
.collector-box {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: 30px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.collector-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0 15px;
    font-size: 14px;
}

.collector-box input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* 버튼 - 콤팩트화 */
.btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 18px; /* 축소 */
    font-size: 13px; /* 축소 */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.2);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* 검색 & 필터 섹션 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px; /* 축소 */
    flex-wrap: wrap;
    gap: 10px;
}

.filter-bar h2 {
    font-size: 18px; /* 축소 */
    font-weight: 600;
}

.search-input-box {
    position: relative;
    width: 260px; /* 축소 */
}

.search-input-box input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px 8px 34px; /* 축소 */
    color: var(--text-primary);
    font-size: 13px; /* 축소 */
    outline: none;
    transition: var(--transition);
}

.search-input-box input:focus {
    border-color: var(--accent-color);
}

.search-input-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 13px;
}

/* 레시피 카드 그리드 - 밀도 향상 */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); /* 더 촘촘하게 */
    gap: 15px; /* 조밀하게 축소 */
}

.recipe-card {
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* 컴팩트 */
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.recipe-card:hover {
    transform: translateY(-4px); /* 리프트 축소 */
    border-color: rgba(255, 107, 107, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-img-wrapper {
    position: relative;
    padding-top: 60%; /* 세로비율 약간 컴팩트화 */
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10px;
    color: var(--accent-color);
    font-weight: 600;
}

.card-badge.badge-youtube {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.card-badge.badge-naver {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.card-body {
    padding: 12px; /* 대폭 축소 */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 14px; /* 축소 */
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    height: 36px; /* 축소 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.75;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    font-size: 11px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

.blogger {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-views, .meta-date {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* 레시피 상세 뷰 레이아웃 - 밀도 향상 */
.recipe-detail {
    background: var(--bg-secondary);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    padding: 24px; /* 여백 축소 */
    margin-top: 10px;
}

.detail-header {
    display: flex;
    gap: 24px; /* 축소 */
    margin-bottom: 25px; /* 축소 */
    flex-wrap: wrap;
}

.detail-img-box {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.detail-img-box img {
    width: 100%;
    height: 260px; /* 높이 컴팩트화 */
    object-fit: cover;
}

.detail-img-btn-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.detail-info {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 300px;
}

.detail-title {
    font-size: 22px; /* 대폭 축소 */
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.detail-meta-list {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.detail-meta-list a {
    color: var(--accent-color);
    text-decoration: none;
}

.detail-meta-list a:hover {
    text-decoration: underline;
}

/* 재료 카드 목록 - 촘촘하게 */
.ingredients-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px; /* 축소 */
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px; /* 축소 */
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
}

.ingredient-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* 축소 */
}

.ingredient-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px 10px; /* 대폭 축소 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px; /* 축소 */
}

.ingredient-tag .name {
    font-weight: 500;
}

.ingredient-tag .amount {
    color: var(--text-secondary);
    font-size: 11px;
    background: rgba(0, 0, 0, 0.2);
    padding: 1px 4px;
    border-radius: 4px;
}

/* 조리 단계 리스트 - 컴팩트화 */
.steps-section {
    margin-top: 25px;
}

.step-card {
    display: flex;
    gap: 20px; /* 축소 */
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px; /* 대폭 축소 */
    margin-bottom: 16px; /* 조밀하게 배치 */
    flex-wrap: wrap;
    position: relative;
    transition: var(--transition);
}

.step-card:hover {
    border-color: rgba(255, 107, 107, 0.2);
}

.step-number {
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--accent-gradient);
    color: white;
    width: 26px; /* 축소 */
    height: 26px; /* 축소 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.step-info {
    flex: 1;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step-text {
    font-size: 13.5px; /* 축소 */
    color: var(--text-primary);
    white-space: pre-wrap;
    line-height: 1.5;
}

/* 수동 에디터 폼 스타일 - 콤팩트 */
.form-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.edit-form-group {
    margin-bottom: 15px; /* 축소 */
}

.edit-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.edit-form-control {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    font-family: var(--font-main);
    transition: var(--transition);
}

.edit-form-control:focus {
    border-color: var(--accent-color);
}

.ing-row, .step-edit-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
    border-color: transparent;
}

/* 로딩 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 107, 0.2);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

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

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 일괄 제어 패널 스타일 */
.bulk-action-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 20px;
    width: 100%;
    transition: var(--transition);
}

.bulk-left {
    display: flex;
    align-items: center;
}

.custom-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    user-select: none;
    color: var(--text-primary);
}

.custom-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: var(--transition);
}

.custom-checkbox-label input[type="checkbox"]:checked {
    background: var(--accent-gradient);
    border-color: transparent;
}

.custom-checkbox-label input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 11px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 카드 체크박스 오버레이 컨테이너 */
.card-checkbox-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: var(--transition);
}

.card-checkbox-container:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: scale(1.08);
}

.recipe-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%; /* 동그란 체크박스 */
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    position: relative;
    outline: none;
    transition: var(--transition);
}

.recipe-checkbox:checked {
    background: var(--accent-gradient);
    border-color: transparent;
}

.recipe-checkbox:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 카드 선택 시 하이라이트 효과 */
.recipe-card.selected {
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.25) !important;
    transform: translateY(-2px);
}

/* 선택 삭제 버튼 스타일 보강 */
#btnBulkDelete {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 20px;
    transition: var(--transition);
    opacity: 0.5;
    pointer-events: none;
}

#btnBulkDelete.active {
    opacity: 1;
    pointer-events: auto;
}

/* 페이드 아웃 애니메이션 */
.recipe-card.fade-out {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 자동 수집 데몬 제어반 스타일 */
.auto-collector-control-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 41, 59, 0.35);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    width: 100%;
    box-shadow: var(--box-shadow);
}

.panel-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    transition: var(--transition);
}

.status-active {
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: status-pulse 1.8s infinite ease-in-out;
}

.status-stopped {
    background-color: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.status-text {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
}

.panel-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-collector-btn {
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    color: #f8fafc !important;
}

.active-collector-btn:hover {
    background: rgba(16, 185, 129, 0.15) !important;
}

.collector-keyword-editor {
    background: rgba(30, 41, 59, 0.28);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: -8px;
    margin-bottom: 20px;
}

.collector-keyword-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.collector-keyword-editor-head strong {
    font-size: 14px;
    color: var(--text-primary);
}

.collector-keyword-editor-head span {
    font-size: 12px;
    color: var(--text-secondary);
}

.collector-keyword-editor textarea {
    width: 100%;
    min-height: 320px;
    max-height: 70vh;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.45);
    color: var(--text-primary);
    padding: 14px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.collector-keyword-editor textarea:focus {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.collector-keyword-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.collector-keyword-editor-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

@keyframes status-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow: 0 0 14px #10b981;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

/* ===== 페이지네이션 ===== */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 8px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.35);
    transform: translateY(-1px);
    pointer-events: none;
}

.page-btn.disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

.page-btn.page-edge {
    font-size: 11px;
}

.page-info {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        border-radius: 8px;
        padding: 0 7px;
    }
    .pagination-wrap {
        gap: 4px;
    }
}

/* ===== 검수 기능 스타일 ===== */

/* 헤더 검수 완료 목록 버튼 */
.btn-reviewed-link {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    position: relative;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}
.btn-reviewed-link:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

/* 검수완료 건수 배지 (헤더 버튼 내부) */
.reviewed-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    margin-left: 4px;
    min-width: 22px;
    height: 18px;
    color: #fff;
    vertical-align: middle;
}

/* 검수 완료 버튼 */
.btn-review {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
    opacity: 0.45;
    pointer-events: none;
}
.btn-review.active {
    opacity: 1;
    pointer-events: auto;
}
.btn-review:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* 검수 취소 버튼 (경고) */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
    opacity: 0.45;
    pointer-events: none;
}
.btn-warning.active {
    opacity: 1;
    pointer-events: auto;
}
.btn-warning:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* 카드 위 검수완료 배지 */
.badge-reviewed {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(16, 185, 129, 0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(16, 185, 129, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* 검수완료 카드 테두리 */
.reviewed-card {
    border-color: rgba(16, 185, 129, 0.15);
}
.reviewed-card:hover {
    border-color: rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15) !important;
}

/* 검수완료 날짜 색상 */
.reviewed-date {
    color: #10b981 !important;
}

/* 검수완료 페이지 상단 배너 */
.reviewed-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.08) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 14px;
    padding: 20px 28px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.reviewed-banner-icon {
    font-size: 36px;
    color: #10b981;
    flex-shrink: 0;
}
.reviewed-banner-info {
    flex: 1;
    min-width: 200px;
}
.reviewed-banner-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 4px;
}
.reviewed-banner-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.reviewed-banner-count {
    text-align: right;
    flex-shrink: 0;
}
.count-number {
    font-size: 36px;
    font-weight: 800;
    color: #10b981;
    display: block;
    line-height: 1;
}
.count-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 검수 버튼 비활성화 공통 */
#btnBulkReview:disabled,
#btnBulkCancel:disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: default;
}

/* ===== 카테고리 탭 ===== */
.ing-category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.ing-cat-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}
.ing-cat-tab i {
    font-size: 12px;
}
.ing-cat-tab:hover {
    background: rgba(var(--cat-color, 148, 163, 184), 0.12);
    border-color: rgba(var(--cat-color, 148, 163, 184), 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.ing-cat-tab.active {
    font-weight: 700;
}
.cat-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    font-size: 10px;
    font-weight: 700;
    color: inherit;
    line-height: 1;
}

/* ===== 식재료 카드 카테고리 배지 ===== */
.ing-cat-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    background: color-mix(in srgb, var(--cat-color, #94a3b8) 20%, transparent);
    color: var(--cat-color, #94a3b8);
    border: 1px solid color-mix(in srgb, var(--cat-color, #94a3b8) 40%, transparent);
}

/* ===== 식재료 목록 페이지 (ingredients_list.php) ===== */

/* 상단 배너 */
.ing-banner {

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(251, 146, 60, 0.25);
    border-radius: 14px;
    padding: 20px 28px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ing-banner-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 240px;
}
.ing-banner-icon {
    font-size: 36px;
    color: #fb923c;
    flex-shrink: 0;
}
.ing-banner-info h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fb923c;
    margin-bottom: 4px;
}
.ing-banner-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* 배너 통계 박스 */
.ing-stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.ing-stat-box {
    text-align: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 18px;
    min-width: 80px;
}
.ing-stat-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #fb923c;
    line-height: 1.1;
}
.ing-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    display: block;
}

/* TOP 5 섹션 */
.ing-top-section {
    margin-bottom: 28px;
}
.ing-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.ing-top-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}
.ing-top-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 14px 14px 0 0;
    opacity: 0;
    transition: var(--transition);
}
.ing-top-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 146, 60, 0.35);
    box-shadow: 0 8px 24px rgba(251, 146, 60, 0.15);
}
.ing-top-card:hover::before {
    opacity: 1;
}
.ing-top-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
}
.ing-top-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.ing-top-bar-wrap {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}
.ing-top-bar {
    height: 100%;
    border-radius: 4px;
    border-right: none;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.ing-top-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}
.ing-top-count strong {
    font-size: 20px;
    font-weight: 800;
}

/* 전체 목록 그리드 - 바둑판 형식 (한 줄에 10개씩) */
.ing-list-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.ing-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-align: center;
}
.ing-item:hover {
    border-color: rgba(251, 146, 60, 0.4);
    background: rgba(251, 146, 60, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(251, 146, 60, 0.15);
}

/* 순위 번호 */
.ing-item-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
}
/* 1~3위 강조 */
.ing-item:nth-child(1) .ing-item-rank { color: #FFD700; background: rgba(255, 215, 0, 0.15); }
.ing-item:nth-child(2) .ing-item-rank { color: #C0C0C0; background: rgba(192, 192, 192, 0.15); }
.ing-item:nth-child(3) .ing-item-rank { color: #CD7F32; background: rgba(205, 127, 50, 0.15); }

.ing-item-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ing-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}
.ing-item-bar-wrap {
    width: 80%;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}
.ing-item-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* 하단 레시피 수 */
.ing-item-meta {
    margin-top: 2px;
}
.ing-recipe-count {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* 열기색 구분 */
.ing-hot .ing-item-name   { color: #fca5a5; }
.ing-warm .ing-item-name  { color: #fdba74; }
.ing-mid .ing-item-name   { color: #fcd34d; }
.ing-low .ing-item-name   { color: #6ee7b7; }
.ing-rare .ing-item-name  { color: #93c5fd; }

/* 식재료 목록 헤더 링크 버튼 */
.btn-ingredients {
    background: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.25);
}
.btn-ingredients:hover {
    box-shadow: 0 4px 16px rgba(251, 146, 60, 0.45);
    transform: translateY(-1px);
}

/* 이미지 아이콘 - TOP5 카드 */
.ing-top-emoji {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 8px;
    box-sizing: border-box;
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s ease;
}
.ing-top-card:hover .ing-top-emoji {
    transform: scale(1.18) rotate(-5deg);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* 이미지 아이콘 - 목록 아이템 */
.ing-item-icon {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 6px;
    box-sizing: border-box;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.ing-item:hover .ing-item-icon {
    transform: scale(1.12);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* 공통 아이콘 이미지 스타일 */
.ing-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

@media (max-width: 1600px) {
    .ing-list-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 1300px) {
    .ing-list-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (max-width: 1000px) {
    .ing-list-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (max-width: 768px) {
    .ing-list-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .ing-top-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ing-stats-row {
        gap: 8px;
    }
    .ing-banner {
        padding: 16px 18px;
    }
}
@media (max-width: 480px) {
    .ing-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ing-item-icon {
        width: 54px;
        height: 54px;
        padding: 4px;
    }
}

/* ===== 수정요청 모드 UI 관련 스타일 ===== */

/* 수정요청 모드 활성화 시 페이지 상단 알림 띠 */
.report-mode-banner {
    position: sticky;
    top: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #fb923c, #f59e0b);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    margin: -20px -20px 20px;
    box-shadow: 0 4px 20px rgba(251, 146, 60, 0.4);
    animation: bannerPulse 2s ease infinite;
}
.report-mode-banner i { font-size: 14px; }
@keyframes bannerPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(251, 146, 60, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(251, 146, 60, 0.7); }
}
.report-mode-active .report-mode-banner {
    display: flex;
}

/* 수정요청 모드 활성화 시 카드 커서 변경 */
.report-mode-active .ing-item {
    cursor: crosshair;
}
.report-mode-active .ing-item:hover {
    border-color: rgba(251, 146, 60, 0.6);
    transform: translateY(-2px);
}

/* 체크박스 스타일 */
.ing-item-checkbox {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
    z-index: 2;
}

/* 수정모드 활성화 시 체크박스 표시 */
.report-mode-active .ing-item-checkbox {
    opacity: 1;
    transform: scale(1);
}

/* 선택된 식재료 카드 스타일 */
.ing-item.selected {
    border-color: #fb923c !important;
    background: rgba(251, 146, 60, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.4), 0 4px 16px rgba(251, 146, 60, 0.25) !important;
    transform: scale(0.97) !important;
}
.ing-item.selected .ing-item-checkbox {
    border-color: #fb923c;
    background: #fb923c;
    color: #fff;
    transform: scale(1.15);
}

/* 하단 플로팅 바 */
.report-floating-bar {
    position: fixed;
    bottom: -100px; /* 기본 숨김 */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 146, 60, 0.1);
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.report-floating-bar.active {
    bottom: 24px;
}

.report-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.report-bar-text {
    font-size: 14px;
    color: var(--text-primary);
}

.report-bar-text i {
    color: #fb923c;
    margin-right: 6px;
}

.report-bar-text strong {
    color: #fb923c;
    font-size: 16px;
}

.report-bar-btns {
    display: flex;
    gap: 8px;
}

/* 모달 오버레이 및 모달 애니메이션 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    margin-bottom: 20px;
}


/* ===== 토스트 알림 ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}
.toast.toast-success {
    background: rgba(5, 150, 105, 0.9);
    border-color: rgba(52, 211, 153, 0.3);
}
.toast.toast-error {
    background: rgba(220, 38, 38, 0.9);
    border-color: rgba(248, 113, 113, 0.3);
}
.toast i { font-size: 18px; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(30px); }
}

/* 쿠팡 파트너스 편집 버튼 스타일 */
.btn-coupang-edit {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition);
    padding: 0;
    margin-left: 4px;
}
.btn-coupang-edit:hover {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.4);
    transform: scale(1.1);
}
.btn-coupang-edit.has-link {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.35);
}
.btn-coupang-edit.has-link:hover {
    background: #fb923c;
    color: #fff;
    border-color: transparent;
}

/* 쿠팡 파트너스 링크 테스트 및 일괄 수정 관련 추가 스타일 */
.btn-coupang-test {
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #60a5fa;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition);
    padding: 0;
    margin-left: 2px;
    text-decoration: none;
}
.btn-coupang-test:hover {
    background: #60a5fa;
    color: #fff;
    border-color: transparent;
    transform: scale(1.15);
}

/* 헤더 네비게이션 고도화 스타일 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.header-nav {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item i {
    font-size: 13px;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.25);
}

.nav-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 10px;
    padding: 1px 6px;
    color: #fff;
    margin-left: 2px;
}

/* 모달 및 일괄 편집 테이블 대대적 리디자인 */
.modal-content.modal-lg {
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content.modal-lg .modal-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 6px;
    text-align: left;
}

.bulk-search-container {
    margin-bottom: 16px;
}

.bulk-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition);
}

.bulk-search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.bulk-table-wrap {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.35);
    overflow: hidden;
    margin-bottom: 8px;
    max-height: 480px;
    overflow-y: auto;
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.bulk-table th {
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.bulk-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.bulk-table tbody tr:last-child td {
    border-bottom: none;
}

.bulk-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.bulk-table-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 7px 10px;
    color: #fff;
    font-size: 12.5px;
    outline: none;
    transition: var(--transition);
}

.bulk-table-input:focus {
    border-color: #fb923c;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

.bulk-table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-bulk-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}

.btn-bulk-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.25);
}

.btn-bulk-test {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    color: #60a5fa;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-bulk-test:hover {
    background: #60a5fa;
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(96, 165, 250, 0.25);
}

/* ===== 삭제 모드 UI 관련 스타일 ===== */
.delete-mode-banner {
    position: sticky;
    top: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    margin: -20px -20px 20px;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    animation: deleteBannerPulse 2s ease infinite;
}
.delete-mode-banner i { font-size: 14px; }
@keyframes deleteBannerPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(239, 68, 68, 0.7); }
}
.delete-mode-active .delete-mode-banner {
    display: flex;
}
.delete-mode-active .ing-item {
    cursor: pointer;
}
.delete-mode-active .ing-item:hover {
    border-color: rgba(239, 68, 68, 0.6);
    transform: translateY(-2px);
}
.delete-mode-active .ing-item-checkbox {
    opacity: 1;
    transform: scale(1);
}
.ing-item.delete-selected {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.4), 0 4px 16px rgba(239, 68, 68, 0.25) !important;
    transform: scale(0.97) !important;
}
.ing-item.delete-selected .ing-item-checkbox {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
    transform: scale(1.15);
}
.delete-floating-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.1);
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.delete-floating-bar.active {
    bottom: 24px;
}
.delete-floating-bar .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}
.delete-floating-bar .btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* ===== 분류 수정 모드 UI 관련 스타일 ===== */
.category-mode-banner {
    position: sticky;
    top: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #10b981, #059669);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    margin: -20px -20px 20px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    animation: categoryBannerPulse 2s ease infinite;
}
.category-mode-banner i { font-size: 14px; }
@keyframes categoryBannerPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(16, 185, 129, 0.7); }
}
.category-mode-active .category-mode-banner {
    display: flex;
}
.category-mode-active .ing-item {
    cursor: pointer;
}
.category-mode-active .ing-item:hover {
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-2px);
}
.category-mode-active .ing-item-checkbox {
    opacity: 1;
    transform: scale(1);
}
.ing-item.category-selected {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.4), 0 4px 16px rgba(16, 185, 129, 0.25) !important;
    transform: scale(0.97) !important;
}
.ing-item.category-selected .ing-item-checkbox {
    border-color: #10b981;
    background: #10b981;
    color: #fff;
    transform: scale(1.15);
}
.category-floating-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.1);
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.category-floating-bar.active {
    bottom: 24px;
}
.category-floating-bar .btn-category {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
.category-floating-bar .btn-category:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* ===== 쿠팡 링크 선택 생성 모드 UI 관련 스타일 ===== */
.coupang-mode-banner {
    position: sticky;
    top: 0;
    z-index: 900;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 0 0 10px 10px;
    margin: -20px -20px 20px;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}
.coupang-mode-banner i { font-size: 14px; }
.coupang-mode-active .coupang-mode-banner {
    display: flex;
}
.coupang-mode-active .ing-item {
    cursor: pointer;
}
.coupang-mode-active .ing-item:hover {
    border-color: rgba(34, 197, 94, 0.6);
    transform: translateY(-2px);
}
.coupang-mode-active .ing-item-checkbox {
    opacity: 1;
    transform: scale(1);
}
.ing-item.coupang-selected {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4), 0 4px 16px rgba(34, 197, 94, 0.25) !important;
    transform: scale(0.97) !important;
}
.ing-item.coupang-selected .ing-item-checkbox {
    border-color: #22c55e;
    background: #22c55e;
    color: #fff;
    transform: scale(1.15);
}
.coupang-floating-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 640px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 14px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.1);
    z-index: 999;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.coupang-floating-bar.active {
    bottom: 24px;
}


