/* ================================
   전역 스타일
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 컬러 팔레트 */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    
    /* 그레이 스케일 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 시맨틱 컬러 */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    
    /* 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 트랜지션 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', '맑은 고딕', 
                 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 14px;
}

/* ================================
   네비게이션 바
   ================================ */
.navbar {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
    cursor: pointer;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 14px;
}

.nav-menu li a:hover {
    background: var(--gray-100);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-menu li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

/* ================================
   메인 컨테이너
   ================================ */
main.container {
    margin: 30px auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

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

/* ================================
   페이지 헤더
   ================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.05rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

/* ================================
   데이터 섹션
   ================================ */
.data-section {
    padding: 35px 40px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.data-section h2 {
    font-size: 1.4rem;
    color: var(--gray-800);
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

/* ================================
   버튼 스타일
   ================================ */
.btn {
    padding: 11px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

/* 작은 버튼 */
.btn-excel,
.btn-image,
.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-edit:hover {
    background: var(--warning-color);
    color: white;
    transform: translateY(-1px);
}

.btn-excel:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-1px);
}

.btn-image:hover {
    background: var(--info-color);
    color: white;
    transform: translateY(-1px);
}

.btn-delete:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-1px);
}

/* ================================
   상태 메시지
   ================================ */
.status-message {
    padding: 14px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.status-success {
    background: var(--success-light);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.status-error {
    background: var(--danger-light);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.status-warning {
    background: var(--warning-light);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.status-info {
    background: var(--info-light);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* ================================
   진행률 바
   ================================ */
.progress-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.progress-bar {
    height: 10px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--gray-700);
}

.progress-detail {
    text-align: center;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 5px;
}

/* ================================
   정보 박스
   ================================ */
.info-box {
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid var(--info-color);
    box-shadow: var(--shadow-sm);
}

.info-box h3 {
    color: var(--info-color);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-box p {
    color: var(--gray-700);
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.6;
}

.info-box strong {
    color: var(--gray-800);
    font-weight: 600;
}

/* ================================
   리스트 섹션
   ================================ */
.product-list-section {
    padding: 35px 40px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.list-header h2 {
    font-size: 1.4rem;
    color: var(--gray-800);
    font-weight: 600;
}

.list-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.list-controls input[type="text"] {
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    width: 250px;
    transition: var(--transition);
    font-family: inherit;
}

.list-controls input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 검색 입력 필드 */
.search-input {
    padding: 11px 16px !important;
    border: 2px solid var(--gray-300) !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    width: 100% !important;
    max-width: 400px !important;
    transition: var(--transition) !important;
    font-family: inherit !important;
}

.search-input:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.total-count {
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
}

.total-count span {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 700;
}

/* ================================
   테이블 스타일
   ================================ */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    border-bottom: 2px solid var(--gray-300);
}

thead th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--gray-50);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody td {
    padding: 14px 12px;
    color: var(--gray-700);
    vertical-align: middle;
}

tbody td:first-child {
    text-align: center;
}

/* 체크박스 스타일 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
    transition: var(--transition);
}

input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* 텍스트 정렬 */
.text-center {
    text-align: center;
}

.error-message {
    color: var(--danger-color);
    font-weight: 500;
}

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

.pagination button {
    padding: 10px 16px;
    border: 2px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    min-width: 42px;
    font-family: inherit;
}

.pagination button:hover:not(.active):not(:disabled) {
    background: var(--gray-100);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination button.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ================================
   푸터
   ================================ */
.footer {
    background: var(--gray-800);
    color: var(--gray-300);
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    font-size: 13px;
}

.footer p {
    margin: 0;
}

/* ================================
   반응형 디자인
   ================================ */
@media (max-width: 1200px) {
    .container {
        margin: 20px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .data-section,
    .product-list-section {
        padding: 25px 20px;
    }
    
    .button-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .list-controls input[type="text"] {
        width: 100%;
    }
    
    .table-container {
        border-radius: 8px;
    }
    
    /* 2분할 레이아웃을 세로로 변경 */
    .product-selection-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-grid {
        max-height: 350px;
    }
}
    
    table {
        font-size: 12px;
    }
    
    thead th,
    tbody td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 35px 25px;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
}

/* ================================
   유틸리티 클래스
   ================================ */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

/* ================================
   생성하기 페이지 (generate.html)
   ================================ */
.generate-section {
    background: white;
    margin: 20px 0;
    border-radius: 15px;
    padding: 30px 40px;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.5s ease-out;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-100);
}

.section-header h2 {
    font-size: 1.3rem;
    color: var(--gray-800);
    font-weight: 600;
    margin: 0;
}

.step-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

/* 폼 요소 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
    font-size: 14px;
}

.form-select, 
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: white;
}

.form-select:focus, 
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-with-button {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

.input-with-button .form-select {
    flex: 1;
    min-width: 300px;
}

.input-with-button .btn {
    white-space: nowrap;
}

/* 2분할 상품 선택 레이아웃 */
.product-selection-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.product-panel {
    background: white;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
    overflow: hidden;
}

.product-panel.selected-panel {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
    border-bottom: 2px solid var(--gray-200);
}

.selected-panel .panel-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom-color: var(--primary-color);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.panel-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid var(--primary-color);
}

/* 상품 그리드 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: var(--gray-50);
}

.product-panel .product-grid {
    border-radius: 0;
    border: none;
    background: transparent;
}

.product-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.product-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    box-shadow: var(--shadow-md);
}

.product-card.selected::before {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-md);
}

/* 선택된 상품 패널의 제거 버튼 */
.selected-panel .product-card.selected::before {
    display: none; /* 선택된 패널에서는 체크 마크 숨김 */
}

.remove-product-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.remove-product-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.product-card-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    padding-right: 35px;
}

.product-card-volume {
    color: var(--gray-600);
    font-size: 13px;
}

/* 통계 바 */
.stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.stat-badge.stat-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-color: var(--primary-color);
}

.stat-badge.stat-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.1));
    border-color: var(--info-color);
}

.stat-label {
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
}

.stat-number {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 20px;
}

.stat-badge.stat-info .stat-number {
    color: var(--info-color);
}

/* 미리보기 박스 */
.preview-box {
    margin-top: 20px;
}

.preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
}

.preview-area {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 25px;
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
}

.preview-area .preview-content {
    font-size: 13px;
    line-height: 1.8;
    color: var(--gray-700);
}

.preview-content h4 {
    color: var(--gray-800);
    font-weight: 600;
    margin: 20px 0 10px 0;
    font-size: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-200);
}

.preview-content p {
    margin: 10px 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.preview-content p:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.empty-icon {
    font-size: 72px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-text {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* 이미지 생성용 숨김 영역 */
#imageGenerationArea {
    position: absolute;
    left: -9999px;
    top: 0;
}

/* 생성하기 페이지 반응형 */
@media (max-width: 768px) {
    .generate-section {
        padding: 25px 20px;
        margin: 15px 0;
    }
    
    .section-header {
        gap: 12px;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
    
    .step-badge {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .input-with-button .form-select {
        min-width: 100%;
    }
    
    .input-with-button .btn {
        width: 100%;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        max-height: 400px;
    }
    
    .stats-bar {
        flex-direction: column;
    }
    
    .stat-badge {
        width: 100%;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .generate-section {
        padding: 20px 15px;
    }
    
    .empty-icon {
        font-size: 56px;
    }
    
    .empty-text {
        font-size: 14px;
    }
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* ================================
   애니메이션
   ================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================================
   스크롤바 스타일
   ================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ================================
   모달 스타일
   ================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
}

.modal-content {
    position: relative;
    z-index: 2001;
    box-shadow: var(--shadow-xl);
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    font-size: 13px;
}

.modal .form-input,
.modal textarea.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.modal .form-input:focus,
.modal textarea.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
