:root {
    --primary-color: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary-color: #F472B6;
    --accent-color: #8B5CF6;
    --text-color: #1F2937;
    --text-light: #6B7280;
    --background-color: #F3F4F6;
    --card-bg: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --info-color: #3B82F6;
    --content-bg: #FFFFFF;
    --card-text: #374151;
    --input-bg: #F9FAFB;
    --input-text: #374151;
    --input-placeholder: #9CA3AF;
    --highlight-bg: #EEF2FF;
    --highlight-text: #4F46E5;

    /* 텍스트 색상 */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-tertiary: #6B7280;

    /* 배경 색상 */
    --bg-primary: #F9FAFB;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F3F4F6;

    /* 테두리 색상 */
    --border-light: #F3F4F6;

    /* 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* 테이블 행 높이 변수 */
    --table-row-min-height: 55px;
    --table-header-min-height: 70px;
    --table-cell-padding: 0.75rem;
}

/* 인증 화면 스타일 */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
}

.auth-section {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
}

.auth-icon {
    margin: 0 auto 1rem auto;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 12px rgba(79, 70, 229, 0.3));
}

.auth-icon:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(79, 70, 229, 0.4));
}

.auth-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-form {
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: authFormSlide 0.6s ease-out;
}

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

.auth-form:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.auth-form-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.auth-form-header h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.auth-form-header h4 i {
    margin-right: 0.5rem;
    color: var(--primary-light);
}

.auth-form-body .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-form-body .input-group {
    margin-bottom: 0.5rem;
}

.auth-form-body .input-group-text {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem 0 0 0.5rem;
}

.auth-form-body .form-control {
    border: 1px solid var(--border-color);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
}

.auth-form-body .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
    background: white;
}

.auth-form-body .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.auth-form-body .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

.auth-form-body .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-light);
    border-radius: 0 0.5rem 0.5rem 0;
}

.auth-form-body .btn-outline-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.auth-form-body .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.auth-form-body .form-text small {
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-alert {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--shadow-sm);
    animation: alertSlide 0.3s ease-out;
}

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

/* 사용자 헤더 스타일 */
.user-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.user-logo {
    filter: drop-shadow(0 2px 8px rgba(79, 70, 229, 0.2));
}

.user-header .dropdown-menu {
    border-radius: 0.75rem;
    border: none;
    box-shadow: var(--shadow-lg);
    padding: 0.75rem;
}

.user-header .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.user-header .dropdown-item:hover {
    background: var(--highlight-bg);
    color: var(--highlight-text);
    transform: translateX(5px);
}

.user-header .dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
}

.user-header .dropdown-header {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 모달 스타일 개선 */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 2px solid var(--border-light);
    border-radius: 1rem 1rem 0 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.modal-header .modal-title i {
    margin-right: 0.5rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid var(--border-light);
    border-radius: 0 0 1rem 1rem;
    background: var(--bg-primary);
}

.modal .form-control {
    border-radius: 0 0.5rem 0.5rem 0;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.modal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

.modal .input-group-text {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    border-radius: 0.5rem 0 0 0.5rem;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem;
    }
    
    .auth-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    .auth-form {
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    .user-header .container {
        padding: 0 1rem;
    }
    
    .user-header h5 {
        font-size: 1.1rem;
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* 업로드 화면 전체 배경 */
.upload-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.upload-container {
    width: 1000px;
    max-width: 1200px;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upload-icon {
    margin: 0 auto 1.5rem auto;
    display: block;
    max-width: 6rem;
    max-height: 6rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 12px rgba(79, 70, 229, 0.3));
}

.upload-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 6px 20px rgba(79, 70, 229, 0.4));
}

.upload-area {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: var(--highlight-bg);
}

.main-container {
    margin-top: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0.25rem auto;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.25rem;
}

h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.upload-section {
    background-color: transparent;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: none;
    box-shadow: none;
    color: var(--card-text);
}

.upload-section h4 {
    margin-top: 0;
    color: var(--text-color);
    border: none;
    padding-left: 0;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
}

/* 전체 테이블 영역 컨테이너 */
.table-area-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    padding: 0 70px; /* 좌우 버튼을 위한 공간 확보 */
}

/* 테이블과 페이지네이션 컨테이너 */
.table-with-pagination-container {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 640px; /* 최소 높이만 설정 */
    max-height: 800px; /* 최대 높이 증가 */
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    overflow: visible; /* 페이지 버튼이 보이도록 변경 */
    background: var(--bg-secondary);
    flex: 1;
}

.table-responsive {
    flex: 1;
    overflow: auto;
    border-radius: 0.5rem;
    margin: 0;
    box-shadow: none;
    height: 100%;
    /* 성능 최적화: GPU 가속 및 렌더링 최적화 */
    transform: translateZ(0);
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    contain: layout style paint;
}

/* 페이지 네비게이션 버튼 */
.page-nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    user-select: none;
    z-index: 50;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.page-nav-button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-50%); /* 위치는 고정하고 */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3); /* 그림자만 진하게 */
    opacity: 0.9; /* 약간의 투명도 효과 */
}

.page-nav-button.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    transform: translateY(-50%); /* 위치 고정 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-nav-button.disabled:hover {
    background: #e9ecef;
    transform: translateY(-50%); /* 위치 고정 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.page-nav-left {
    left: -60px; /* 테이블에서 더 멀리 떨어뜨려서 마진 효과 */
}

.page-nav-right {
    right: -60px; /* 테이블에서 더 멀리 떨어뜨려서 마진 효과 */
}

/* 페이지 정보 컨테이너 */
.pagination-info-container {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 0.25rem;
    margin-left: 60px; /* 좌측 버튼 공간만큼 마진 */
    margin-right: 60px; /* 우측 버튼 공간만큼 마진 */
}

.page-info {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

#itemsInfo {
    font-size: 0.9rem;
    display: none; /* 총 항목 수 숨기기 */
}

/* 페이지당 드롭다운 숨기기 */
.pagination-info-container .col-md-4:first-child {
    display: none;
}

/* 페이지당 선택 관련 요소들 숨기기 */
#itemsPerPageSelect,
label[for="itemsPerPageSelect"],
.pagination-info-container select {
    display: none !important;
}

/* 페이지 정보만 중앙에 표시 */
.pagination-info-container .row {
    justify-content: center;
}

.pagination-info-container .col-md-4:not(:first-child):not(:last-child) {
    text-align: center !important;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-info-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-info {
    text-align: center;
    width: 100%;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .container {
        margin: 0.125rem;
        padding: 0.5rem;
    }
    
    .table-area-container {
        gap: 0.25rem;
    }
    
    .table-with-pagination-container {
        min-height: 580px; /* 최소 높이만 설정 */
        max-height: 700px; /* 최대 높이 증가 */
    }
    
    .page-nav-button {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .pagination-info-container {
        padding: 0.25rem 0.5rem;
        margin-top: 0.125rem;
    }
    
    .pagination-info-container .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.25rem;
        text-align: center;
    }
    
    .pagination-info-container .col-md-4:first-child {
        display: none;
    }
    
    .pagination-info-container .row {
        flex-direction: column;
    }
    
    .table-area-container {
        padding: 0 50px; /* 모바일에서 패딩 조정 */
    }
    
    .page-nav-left {
        left: -45px;
    }
    
    .page-nav-right {
        right: -45px;
    }
    
    .pagination-info-container {
        margin-left: 50px; /* 모바일에서 페이지 정보 마진 조정 */
        margin-right: 50px;
    }
    
    h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.6rem;
        min-height: 50px; /* 최소 높이로 변경 */
        height: auto; /* 자동 높이 */
    }
    
    .table-responsive thead th {
        min-height: 65px; /* 최소 높이로 변경 */
        height: auto; /* 자동 높이 */
    }
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: var(--bg-secondary);
    min-width: 1000px;
    /* 성능 최적화: 테이블 렌더링 개선 */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.table-hover>tbody>tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.table th,
.table td {
    padding: var(--table-cell-padding) var(--table-cell-padding);
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    white-space: pre-line;
    min-height: var(--table-row-min-height); /* CSS 변수 사용 */
    height: auto; /* 자동 높이 */
}

.table-responsive thead th {
    position: sticky;
    top: 0;
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 20;
    min-height: var(--table-header-min-height); /* CSS 변수 사용 */
    height: auto; /* 자동 높이 */
}

.table th.key-column,
.table td:first-child {
    position: sticky;
    left: 0;
    background-color: var(--card-bg);
    z-index: 10;
}

.table thead th.key-column {
    position: sticky;
    left: 40px;
    z-index: 100;
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color);
}

.table-responsive::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 개선된 로딩 UI */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
}

.loading-container {
    width: 1000px;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    text-align: center;
    color: #333;
}

.loading-icon {
    margin-bottom: 2rem;
}

.loading-icon .spinner-grow {
    width: 1.8rem;
    height: 1.8rem;
    margin: 0 0.5rem;
    animation-duration: 1.2s;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.loading-icon .spinner-grow:nth-child(1) {
    animation-delay: 0s;
}

.loading-icon .spinner-grow:nth-child(2) {
    animation-delay: 0.15s;
}

.loading-icon .spinner-grow:nth-child(3) {
    animation-delay: 0.3s;
}

.progress-section {
    margin-bottom: 2rem;
}

.progress {
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    height: 16px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: progressShine 2s linear infinite;
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: progressSweep 2.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes progressSweep {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.progress-percentage {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.status-section {
    margin-bottom: 2rem;
}

.status-item {
    padding: 1.25rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(102, 126, 234, 0.15);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.1), 
        transparent
    );
    transition: left 0.5s ease;
}

.status-item:hover::before {
    left: 100%;
}

.status-item i {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    display: block;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    animation: statusIconPulse 2s ease-in-out infinite;
}

@keyframes statusIconPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.status-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tips-section {
    margin-top: 1.5rem;
}

.tip-card {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.08) 0%, 
        rgba(118, 75, 162, 0.08) 100%
    );
    padding: 1.25rem 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    animation: tipGlow 3s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(102, 126, 234, 0.1) 0%, 
        transparent 70%
    );
    animation: tipRotate 8s linear infinite;
    z-index: 0;
}

.tip-card i,
.tip-card span {
    position: relative;
    z-index: 1;
}

.tip-card i {
    font-size: 1.4rem;
    flex-shrink: 0;
    color: #667eea;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

@keyframes tipGlow {
    0% { 
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
        border-color: rgba(102, 126, 234, 0.2);
    }
    100% { 
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
        border-color: rgba(102, 126, 234, 0.4);
    }
}

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

.loading-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 2px rgba(102, 126, 234, 0.2);
    animation: messageSlide 0.5s ease-out;
}

@keyframes messageSlide {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.current-step {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    animation: stepBounce 0.6s ease-out;
    margin: 0.5rem 0;
}

@keyframes stepBounce {
    0% {
        opacity: 0.7;
        transform: scale(0.95) translateY(5px);
    }
    50% {
        transform: scale(1.02) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 반응형 로딩 UI */
@media (max-width: 768px) {
    .upload-wrapper {
        padding: 1rem;
    }
    
    .upload-container {
        max-width: 100%;
        border-radius: 1rem;
    }
    
    .loading {
        padding: 1rem;
    }
    
    .loading-container {
        max-width: 100%;
        margin: 0 1rem;
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .status-section .row {
        gap: 0.5rem;
    }
    
    .status-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .tip-card {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

.card {
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    border: none;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: var(--card-bg);
    color: var(--card-text);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.key-column {
    position: relative;
    min-width: 200px;
    width: auto;
    max-width: 300px;
    border-right: 1px solid var(--border-light);
}

.key-column:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 저장된 키워드 스타일 */
.saved-keyword-cell {
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(220, 53, 69, 0.1);
}

.saved-keyword-text {
    font-weight: 600;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 저장된 키워드에 이모지 추가 */
.saved-keyword-text::before {
    content: attr(data-product-count);
    margin-right: 0.5rem;
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    /* 강제 재렌더링을 위한 애니메이션 */
    animation: refreshBadge 0.1s ease-in-out;
}

@keyframes refreshBadge {
    0% { opacity: 0.95; }
    100% { opacity: 1; }
}

.saved-keyword-cell:hover {
    background-color: #ffeaea !important;
}

.saved-keyword-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.75rem;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.saved-filters {
    margin-bottom: 20px;
}

.saved-filters h5 {
    color: var(--text-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.saved-filters h5::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -5px;
    left: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    margin: 5px;
    background-color: var(--highlight-bg);
    color: var(--highlight-text);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.filter-chip.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.filter-chip .close,
.filter-chip .edit,
.filter-chip .reset {
    cursor: pointer;
    opacity: 0.7;
    font-weight: bold;
    margin-left: 8px;
    transition: opacity 0.2s;
}

.filter-chip .close:hover,
.filter-chip .edit:hover,
.filter-chip .reset:hover {
    opacity: 1;
}

/* 기본 제공 필터 칩 스타일 */
.filter-chip.default-filter {
    font-weight: 600;
    border: 2px solid;
    position: relative;
}

.filter-chip.dakdeung-filter {
    background-color: #f0f9ff;
    color: #059669;
    border-color: #10b981;
}

.filter-chip.dakdeung-filter:hover {
    background-color: #10b981;
    color: white;
}

.filter-chip.dakdeung-filter.active {
    background-color: #10b981;
    color: white;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.filter-chip.juryeok-filter {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #3b82f6;
}

.filter-chip.juryeok-filter:hover {
    background-color: #3b82f6;
    color: white;
}

.filter-chip.juryeok-filter.active {
    background-color: #3b82f6;
    color: white;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* 기본 필터 삭제 버튼 비활성화 */
.filter-chip.default-filter .close {
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

/* 프리미엄 전용 필터 스타일 */
.filter-chip.premium-only {
    opacity: 0.7;
    position: relative;
    overflow: hidden;
    filter: blur(0.3px);
    transition: all 0.3s ease;
}

.filter-chip.premium-only:hover {
    opacity: 0.8;
    cursor: pointer;
    filter: blur(0.1px);
}

.filter-chip.premium-only::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.4));
    pointer-events: none;
    z-index: 1;
}

.filter-chip.premium-only > * {
    position: relative;
    z-index: 0;
    opacity: 0.6;
}

.filter-chip.premium-only .premium-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f59e0b;
    color: white;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    z-index: 2;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.filter-chip.premium-only .premium-badge::before {
    content: '🔒';
    margin-right: 3px;
    font-size: 0.6rem;
}

.month-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    justify-content: center;
    align-items: center;
}

.month-button {
    position: relative;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 5px 5px 0;
}

.month-button:hover {
    background-color: var(--highlight-bg);
    border-color: var(--primary-color);
}

.month-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.month-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--input-bg);
    color: var(--text-light);
    border-color: var(--border-color);
}

.month-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    min-width: 20px;
    text-align: center;
}

.month-button.active .month-count {
    background-color: white;
    color: var(--primary-color);
}

.month-button.disabled .month-count {
    background-color: var(--text-light);
}

#filterModal .modal-dialog {
    max-width: 800px;
}

#filterModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#filterModal .modal-header {
    background-color: var(--highlight-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

#filterModal .modal-title {
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.25rem;
}

#filterModal .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

#filterModal .modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    background-color: var(--highlight-bg);
}

#filterModal .rule-remove-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
    line-height: 1;
}

/* 필터 모달 내 메시지 스타일 */
#noRulesMsg {
    margin-top: 1rem;
    margin-bottom: 0;
    border: 1px solid #b6effb;
    background-color: #e7f6fd;
    color: #0c5460;
    border-radius: 8px;
    padding: 12px 16px;
    position: relative;
    z-index: 1;
}

#noRulesMsg i {
    margin-right: 8px;
    color: #0ea5e9;
}

#noAdvancedFiltersMsg {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #b6effb;
    background-color: #e7f6fd;
    color: #0c5460;
    border-radius: 8px;
    padding: 12px 16px;
    position: relative;
    z-index: 1;
    display: block;
}

#noAdvancedFiltersMsg i {
    margin-right: 8px;
    color: #0ea5e9;
}

/* 고급 필터 컨테이너 스타일 */
.saved-advanced-filters {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.saved-advanced-filters .d-flex {
    margin-bottom: 0.5rem;
}

.table th:not(.key-column),
.table td:not(:first-child) {
    min-width: 180px;
    max-width: 250px;
}

.floating-menu-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 12px;
    border: 1px solid var(--border-color);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 120px;
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-item:hover {
    background-color: var(--highlight-bg);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.keyword-context-menu {
    position: absolute;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 8px 0;
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.keyword-context-menu.show {
    display: block;
}

.keyword-context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    transition: all 0.2s;
}

.keyword-context-menu-item:hover {
    background-color: var(--primary-light);
}

.keyword-context-menu-item i {
    font-size: 1.1em;
}

.keyword-context-menu-item[data-action="naver"] {
    color: #03c75a;
}

.keyword-context-menu-item[data-action="coupang"] {
    color: #e6186c;
}

.keyword-context-menu-item[data-action="translate"] {
    color: #6366f1;
}

.keyword-context-menu-item[data-action="translate"]:hover {
    background-color: #f3f4f6;
}

.checkbox-context-menu {
    position: fixed;
    display: none;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 8px 0;
    min-width: 150px;
    z-index: 1000;
}

.checkbox-context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    transition: all 0.2s;
}

.checkbox-context-menu-item:hover {
    background-color: var(--primary-light);
}

.checkbox-context-menu-item i {
    font-size: 1.1em;
    color: var(--primary-color);
}

.checkbox-context-menu-item span {
    font-size: 0.9rem;
}

/* 체크박스 열 */
.checkbox-column {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 100;
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color);
    padding: 0 !important;
}

.table thead th.checkbox-column {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 101;
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color);
}

/* 카테고리 열 텍스트 잘림 처리 - 8글자 이상일 때 줄바꿈 방지 */
.table td.category-cell {
    max-width: 200px;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    word-break: keep-all;
    word-wrap: break-word;
}

/* 카테고리 컬럼 전체에 줄바꿈 방지 적용 */
.table td.category-column {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
    word-break: keep-all;
    cursor: help;
    position: relative;
}

/* 키워드 컬럼은 카테고리 스타일의 영향을 받지 않도록 보장 */
.table td.key-column {
    white-space: pre-line !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: unset !important;
    word-break: normal !important;
    cursor: default !important;
    position: sticky;
    left: 40px;
    z-index: 99;
    min-width: 200px;
    max-width: 300px;
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-color);
}

/* 카테고리 컬럼 호버 시 툴팁 표시 */
.table td.category-column:hover {
    overflow: visible;
    z-index: 999;
}

.table td.category-column:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
    top: 100%;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
    margin-top: 4px;
}

.select-all-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.select-all-container:hover {
    background-color: var(--highlight-bg);
}

.select-all-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
    transform: scale(1);
    transition: transform 0.1s ease;
}

.select-all-checkbox:hover {
    transform: scale(1.1);
}

.keyword-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px 0;
    cursor: pointer;
    width: 100%;
    position: relative;
    user-select: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.keyword-checkbox-container:hover {
    background-color: var(--highlight-bg);
}

.keyword-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    position: relative;
    z-index: 2;
    accent-color: var(--primary-color);
    transform: scale(1);
    transition: transform 0.1s ease;
}

.keyword-checkbox:hover {
    transform: scale(1.1);
}

.keyword-checkbox:checked+span {
    color: var(--primary-color);
    font-weight: 500;
}

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

/* 페이지네이션 스타일 - 간소화된 버전 */
.pagination-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px 15px;
  border: 1px solid #dee2e6;
  text-align: center;
}

#paginationInfo {
  font-size: 0.9rem;
  color: #6c757d;
  margin: 0;
}

/* 후순위 조건을 만족하는 키워드 스타일 */
.keyword-text.priority-satisfied {
    font-weight: bold !important;
    color: #0066cc !important;
    position: relative;
}

.keyword-text.priority-satisfied::after {
    content: '★';
    color: #ffd700;
    margin-left: 5px;
    font-size: 0.9em;
}

/* 후순위 조건 만족 키워드 호버 효과 */
.keyword-text.priority-satisfied:hover {
    color: #004499 !important;
    text-shadow: 0 0 3px rgba(0, 102, 204, 0.3);
}

/* 행 하이라이트 스타일 */
tbody tr.highlighted {
  background-color: #f0f8ff !important;
}

tbody tr.highlighted td {
  background-color: #f0f8ff !important;
}

/* 셀 포커스 효과 - 엑셀 스타일 */
td.focused {
  background-color: #e3f2fd !important;
  border: 2px solid #2196f3 !important;
  box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
  z-index: 10;
  outline: none;
}

/* 선택된 행 스타일 */
tbody tr.selected {
  background-color: #e8f5e8 !important;
}

tbody tr.selected td {
  background-color: #e8f5e8 !important;
}

/* 키보드 네비게이션을 위한 테이블 셀 개선 */
td:focus {
  outline: 2px solid #2196f3;
  outline-offset: -2px;
}

/* 테이블 셀 포커스 가능하도록 설정 */
.table tbody td {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table tbody td:hover {
  background-color: rgba(0, 123, 255, 0.1) !important;
}

/* 복사 효과 스타일 */
td.copied {
  background-color: #d4edda !important;
  border: 2px solid #28a745 !important;
  animation: copyFlash 0.3s ease-out;
}

@keyframes copyFlash {
  0% {
    background-color: #28a745;
    transform: scale(1);
  }
  50% {
    background-color: #d4edda;
    transform: scale(1.02);
  }
  100% {
    background-color: #d4edda;
    transform: scale(1);
  }
}

/* 복사 피드백 메시지 스타일 */
.copy-feedback {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  animation: copyFeedbackShow 0.2s ease-out;
}

.copy-feedback i {
  font-size: 14px;
}

@keyframes copyFeedbackShow {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 키워드 그룹 관리 스타일 */
.keyword-group {
  margin-bottom: 1rem;
}

.keyword-group-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.keyword-group-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.keyword-group-header:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
  transform: translateY(-1px);
}

.keyword-group-header:hover::before {
  left: 100%;
}

.keyword-group-header h6 {
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}

.keyword-group-header .bi-folder2 {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.group-toggle-icon {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.keyword-group-content {
  animation: slideDown 0.3s ease-out;
}

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

.keyword-list {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.keyword-item {
  background: #fafbfc;
  border: 1px solid #e1e5e9;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.keyword-item:last-child {
  margin-bottom: 0;
}

.keyword-item:hover {
  background: #f0f4f8;
  border-color: var(--primary-light);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.keyword-name {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
}

.keyword-item .text-muted {
  font-size: 0.8rem;
  line-height: 1.4;
}

.controls-container {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.controls-container .btn {
  font-size: 0.85rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.controls-container .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 빈 상태 스타일 */
.text-center.text-muted.py-5 {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 1rem;
  border: 2px dashed var(--border-color);
  margin: 2rem 0;
}

.text-center.text-muted.py-5 .bi-bookmark-x {
  color: var(--text-tertiary);
  opacity: 0.7;
}

.text-center.text-muted.py-5 h5 {
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.text-center.text-muted.py-5 p {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* 스크롤바 스타일 */
.keyword-list::-webkit-scrollbar {
  width: 6px;
}

.keyword-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.keyword-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.keyword-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .keyword-group-header {
    padding: 0.75rem;
  }
  
  .keyword-group-header h6 {
    font-size: 0.9rem;
  }
  
  .keyword-item {
    padding: 0.5rem;
  }
  
  .keyword-name {
    font-size: 0.85rem;
  }
  
  .keyword-item .text-muted {
    font-size: 0.75rem;
  }
  
  .controls-container .btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }
}

/* 편집 가능한 필드 스타일 */
.editable-field {
    cursor: pointer;
    color: #0d6efd;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.editable-field:hover {
    background-color: #e7f1ff;
    color: #0d6efd;
    text-decoration-style: solid;
}

.editable-field[data-field="taobaoLink"] {
    word-break: break-all;
    max-width: 200px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 키워드 관리 UI 스타일 */
.keyword-list-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.keyword-list-item:hover {
    background-color: var(--highlight-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.keyword-list-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.keyword-list-item.active:hover {
    background-color: var(--primary-dark);
}

.keyword-list-item .keyword-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.keyword-list-item .keyword-category {
    font-size: 0.85rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.keyword-list-item .keyword-stats {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 4px;
}

.keyword-detail-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.keyword-detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.keyword-detail-category {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 12px;
}

.product-slot {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    background-color: var(--bg-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.product-slot.filled {
    border-style: solid;
    border-color: var(--success-color);
    background-color: var(--card-bg);
}

.product-slot:hover {
    border-color: var(--primary-color);
    background-color: var(--highlight-bg);
}

.product-slot-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 16px;
}

.product-slot-number {
    background-color: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.product-slot-actions {
    display: flex;
    gap: 8px;
}

.product-input-group {
    margin-bottom: 16px;
}

.product-input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-input-group input,
.product-input-group textarea {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.product-input-group input:focus,
.product-input-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.slots-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.slots-container::-webkit-scrollbar {
    width: 6px;
}

.slots-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.slots-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.slots-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.add-slot-btn {
    width: 100%;
    border: 2px dashed var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    padding: 16px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.add-slot-btn:hover {
    background-color: var(--primary-light);
    border-style: solid;
}

.keyword-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.empty-slots-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-slots-message i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.slot-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.2s ease;
}

.product-slot:hover .slot-remove-btn {
    opacity: 1;
}

.slot-remove-btn:hover {
    background-color: var(--danger-dark);
    transform: scale(1.1);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .modal-dialog.modal-fullscreen .row {
        flex-direction: column;
    }
    
    .col-md-3, .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-md-3 {
        min-height: 300px !important;
        border-bottom: 1px solid var(--border-color);
        border-right: none !important;
    }
}

/* 키워드 검색 관련 스타일 */
.search-result-header {
  animation: fadeInUp 0.3s ease-out;
}

.search-result-header .btn {
  transition: all 0.2s ease;
}

.search-result-header .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 관리 모달 검색 영역 */
.modal .border-bottom {
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.modal .input-group-lg .form-control {
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.modal .input-group-lg .form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  transform: translateY(-1px);
}

.modal .input-group-text.bg-primary {
  border: 2px solid #007bff;
  padding: 0.75rem 1rem;
}

.modal .input-group .btn-outline-secondary {
  border: 2px solid #e9ecef;
  border-left: none;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.modal .input-group .btn-outline-secondary:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
  transform: scale(1.05);
}

/* 키워드 그룹 스타일 개선 */
.keyword-group {
  transition: all 0.3s ease;
}

.keyword-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.keyword-group-header {
  transition: background-color 0.2s ease;
}

.keyword-group-header:hover {
  background-color: #e9ecef !important;
}

.group-toggle-icon {
  transition: transform 0.2s ease;
}

/* 키워드 아이템 호버 효과 */
.keyword-item:hover {
  background-color: #f8f9fa !important;
  transform: translateX(5px);
  transition: all 0.2s ease;
}

/* 검색 입력 필드 스타일 */
#keywordSearchInput {
  transition: all 0.3s ease;
}

#keywordSearchInput:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  border-color: #86b7fe;
  transform: scale(1.02);
}

/* 키워드 상세 헤더의 드롭다운 메뉴 스타일 */
.keyword-detail-header .dropdown-menu {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
}

.keyword-detail-header .dropdown-item {
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.keyword-detail-header .dropdown-item:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

.keyword-detail-header .dropdown-item i {
  width: 20px;
  text-align: center;
}

/* 검색어 하이라이트 스타일 */
.search-highlight {
  background-color: #ffeb3b;
  color: #333;
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 500;
}

/* 검색 버튼들 스타일 */
.search-buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.search-buttons-wrapper .btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.search-buttons-wrapper .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 대량등록 모달 스타일 */
.bulk-add-modal .form-control {
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.bulk-add-modal .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.bulk-add-modal textarea {
  line-height: 1.6;
  font-size: 0.9rem;
}

.bulk-add-modal .col-md-6 {
  border-right: 1px solid #dee2e6;
  padding-right: 20px;
}

.bulk-add-modal .col-md-6:last-child {
  border-right: none;
  padding-left: 20px;
  padding-right: 15px;
}

.bulk-add-modal .form-label {
  color: #495057;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.bulk-add-modal .alert-info {
  background-color: #f8f9ff;
  border: 1px solid #b6d7ff;
  border-radius: 8px;
  margin-top: 15px;
}

.bulk-add-modal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: none;
}

.bulk-add-modal .modal-header .btn-close {
  filter: invert(1);
}

.bulk-add-modal .modal-title i {
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .bulk-add-modal .col-md-6 {
    border-right: none;
    padding-right: 15px;
    margin-bottom: 20px;
  }
  
  .bulk-add-modal .col-md-6:last-child {
    padding-left: 15px;
    margin-bottom: 0;
  }
}

/* 내보내기 모달 스타일 */
#exportModal .modal-header {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border-bottom: none;
}

#exportModal .modal-header .btn-close {
  filter: invert(1);
}

/* 모달 위에 표시되는 알럿 스타일 개선 */
.alert,
.modal .alert,
.modal-backdrop + .alert {
  z-index: 1060 !important;
  position: relative;
}

/* SweetAlert나 기타 팝업이 모달 위에 표시되도록 */
.swal2-container {
  z-index: 2000 !important;
}

/* 내보내기 모달 내의 오류 메시지 z-index 높이기 */
#exportModal .alert,
#exportModal .alert-danger,
#exportModal .alert-warning,
#exportModal .alert-info {
  z-index: 1070 !important;
  position: relative;
}

/* JavaScript 생성 알럿들 */
.custom-alert,
.error-popup,
.success-popup,
.warning-popup {
  z-index: 2000 !important;
  position: fixed;
}

/* 모달 위에 표시되는 알럿 스타일 개선 */
.alert,
.modal .alert,
.modal-backdrop + .alert {
  z-index: 1060 !important;
  position: relative;
}

/* SweetAlert나 기타 팝업이 모달 위에 표시되도록 */
.swal2-container {
  z-index: 2000 !important;
}

/* 내보내기 모달 내의 오류 메시지 z-index 높이기 */
#exportModal .alert,
#exportModal .alert-danger,
#exportModal .alert-warning,
#exportModal .alert-info {
  z-index: 1070 !important;
  position: relative;
}

/* JavaScript 생성 알럿들 */
.custom-alert,
.error-popup,
.success-popup,
.warning-popup {
  z-index: 2000 !important;
  position: fixed;
}

/* 모달과 팝업 z-index 문제 해결 */
.alert,
.modal .alert,
.modal-backdrop + .alert {
  z-index: 1060 !important;
  position: relative;
}

/* SweetAlert나 기타 팝업이 모달 위에 표시되도록 */
.swal2-container {
  z-index: 2000 !important;
}

/* 내보내기 모달 내의 오류 메시지 z-index 높이기 */
#exportModal .alert,
#exportModal .alert-danger,
#exportModal .alert-warning,
#exportModal .alert-info {
  z-index: 1070 !important;
  position: relative;
}

/* JavaScript 생성 알럿들 */
.custom-alert,
.error-popup,
.success-popup,
.warning-popup {
  z-index: 2000 !important;
  position: fixed;
}

/* Bootstrap 모달 백드롭 위에 알럿 표시 */
body.modal-open .alert {
  z-index: 1070 !important;
}

/* 전역 알럿 메시지 우선순위 */
div[id*="alert"],
div[class*="alert"],
.modal-alert {
  z-index: 1070 !important;
}

/* 내보내기 모달 특별 처리 */
#exportModal {
  z-index: 1055;
}

#exportModal .modal-backdrop {
  z-index: 1050;
}

/* 내보내기 모달이 열려있을 때 알럿 우선순위 */
body.modal-open #exportModal ~ .alert,
body.modal-open .alert[data-modal="export"],
.export-modal-alert {
  z-index: 2100 !important;
  position: fixed !important;
}

/* 모든 JavaScript 알럿이 최상위에 표시되도록 */
.js-alert,
.dynamic-alert,
[id*="Alert"],
[class*="Alert"] {
  z-index: 2200 !important;
  position: fixed !important;
}

/* 최종 z-index 우선순위 설정 */
/* 1. Bootstrap 모달: 1055 */
/* 2. 모달 백드롭: 1050 */  
/* 3. 모달 내 알럿: 1070 */
/* 4. JavaScript 알럿: 2000+ */

/* 내보내기 모달에서 발생하는 모든 알럿을 최상위로 */
body.modal-open .alert,
.modal-open .alert,
#exportModal + .alert,
.export-error-alert,
.modal-error-popup {
  z-index: 2500 !important;
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  min-width: 300px !important;
  max-width: 500px !important;
}

/* ====== 엑셀 스타일 드래그 선택 기능 ====== */

/* 드래그 선택된 셀 스타일 */
.selected-cell {
    background-color: rgba(79, 70, 229, 0.15) !important;
    border: 2px solid #4F46E5 !important;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.3);
}

/* 엑셀 스타일 점선 패턴 */
.selected-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(79, 70, 229, 0.08) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(79, 70, 229, 0.08) 50%, 
        rgba(79, 70, 229, 0.08) 75%, 
        transparent 75%);
    background-size: 8px 8px;
    pointer-events: none;
    opacity: 0.6;
}

/* 드래그 중 텍스트 선택 방지 */
.table.dragging {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: crosshair;
}

/* 선택된 셀과 포커스된 셀이 겹칠 때 */
td.focused.selected-cell {
    background-color: rgba(79, 70, 229, 0.25) !important;
    border: 3px solid #4F46E5 !important;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3), 
                inset 0 0 0 1px rgba(79, 70, 229, 0.4);
}

/* 드래그 선택 시 호버 효과 조정 */
.table tbody tr:hover td.selected-cell {
    background-color: rgba(79, 70, 229, 0.2) !important;
}

/* 선택된 셀의 텍스트 가독성 향상 */
.selected-cell {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* 선택 영역 표시를 위한 오버레이 */
.selection-overlay {
    position: absolute;
    border: 2px dashed #4F46E5;
    background-color: rgba(79, 70, 229, 0.1);
    pointer-events: none;
    z-index: 10;
    border-radius: 4px;
    animation: selectionPulse 1s ease-in-out infinite alternate;
}

@keyframes selectionPulse {
    0% { opacity: 0.6; }
    100% { opacity: 0.3; }
}

/* 드래그 선택 애니메이션 */
@keyframes cellSelect {
    0% {
        background-color: transparent;
        transform: scale(1);
        box-shadow: none;
    }
    50% {
        background-color: rgba(79, 70, 229, 0.3);
        transform: scale(1.02);
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
    }
    100% {
        background-color: rgba(79, 70, 229, 0.15);
        transform: scale(1);
        box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.3);
    }
}

.selected-cell.animate {
    animation: cellSelect 0.3s ease-out;
}

/* 다중 선택 시 복사 피드백 개선 */
.copy-feedback.multi-select {
    background: linear-gradient(45deg, #10B981, #059669);
    font-weight: 600;
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.copy-feedback.multi-select::before {
    content: '📋 ';
    margin-right: 4px;
    font-size: 1.1em;
}

/* 엑셀 스타일 셀 테두리 강화 */
.selected-cell:not(:first-child) {
    border-left: 2px solid #4F46E5 !important;
}

.selected-cell:not(:last-child) {
    border-right: 2px solid #4F46E5 !important;
}

/* 선택 영역의 모서리 강조 */
.selected-cell.corner-tl {
    border-top-left-radius: 4px;
}

.selected-cell.corner-tr {
    border-top-right-radius: 4px;
}

.selected-cell.corner-bl {
    border-bottom-left-radius: 4px;
}

.selected-cell.corner-br {
    border-bottom-right-radius: 4px;
}

/* ====== 필터 모달 개선 ====== */

/* 필터 모달 내부 z-index 조정 */
#filterModal {
    z-index: 1055;
}

#filterModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#filterModal .modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#filterModal .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
}

#filterModal .modal-body {
    padding: 2rem;
    background: var(--content-bg);
}

#filterModal .modal-footer {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 12px 12px;
}

/* 필터 규칙 제거 버튼 스타일 개선 */
#filterModal .rule-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    opacity: 0.7;
    transition: all 0.2s ease;
}

#filterModal .rule-remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 필터 관련 메시지 스타일 */
#noRulesMsg {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 1px solid #C7D2FE;
    color: var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

#noRulesMsg i {
    color: var(--primary-light);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* 고급 필터 메시지 스타일 */
#noAdvancedFiltersMsg {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    color: var(--info-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#noAdvancedFiltersMsg i {
    color: var(--info-color);
    font-size: 1.2rem;
    opacity: 0.8;
}

/* 저장된 고급 필터 영역 스타일 */
.saved-advanced-filters {
    background: var(--content-bg);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.saved-advanced-filters .d-flex {
    align-items: center;
    gap: 1rem;
}

/* 필터 칩 스타일 개선 */
.filter-chip {
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    z-index: 1;
}

/* 모바일에서의 드래그 선택 최적화 */
@media (max-width: 768px) {
    .selected-cell::before {
        background-size: 6px 6px;
    }
    
    .selected-cell {
        border-width: 2px !important;
    }
    
    td.focused.selected-cell {
        border-width: 3px !important;
    }
    
    /* 모바일에서 드래그 감도 조정 */
    .table.dragging {
        cursor: cell;
    }
    
    /* 필터 모달 모바일 최적화 */
    #filterModal .modal-body {
        padding: 1rem;
    }
    
    #noRulesMsg,
    #noAdvancedFiltersMsg {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* 필터 관련 알림 메시지가 모달 내부에 표시되도록 */
#filterModal .alert {
    position: relative;
    z-index: 10;
    margin: 0.5rem 0;
}

/* 필터 모달의 alert가 모달 내부에 올바르게 표시되도록 */
.modal .alert {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
}

/* ====== 새 키워드 추가 및 내보내기 버튼 스타일 ====== */

/* 새 키워드 추가 버튼 - 파란색 배경, 흰색 글씨, 호버 효과 제거 */
#addNewKeywordBtn {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
    transition: none !important;
}

#addNewKeywordBtn:hover,
#addNewKeywordBtn:focus,
#addNewKeywordBtn:active,
#addNewKeywordBtn:hover:not(:disabled),
#addNewKeywordBtn:focus:not(:disabled),
#addNewKeywordBtn:active:not(:disabled) {
    background-color: #007bff !important;
    border-color: #007bff !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 내보내기 버튼 - 초록색 배경, 흰색 글씨, 호버 효과 제거 */
#exportKeywordsBtn {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    transition: none !important;
}

#exportKeywordsBtn:hover,
#exportKeywordsBtn:focus,
#exportKeywordsBtn:active,
#exportKeywordsBtn:hover:not(:disabled),
#exportKeywordsBtn:focus:not(:disabled),
#exportKeywordsBtn:active:not(:disabled) {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 버튼 클릭 시 outline 제거 */
#addNewKeywordBtn:focus,
#exportKeywordsBtn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* 버튼이 disabled 상태일 때도 스타일 유지 */
#addNewKeywordBtn:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    opacity: 0.6;
}

#exportKeywordsBtn:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
    opacity: 0.6;
}

#exportKeywordsBtn:disabled {
    background: #D1D5DB;
    border-color: #D1D5DB;
    cursor: not-allowed;
    box-shadow: none;
}

/* 도움말 모달 스타일 */
.help-modal-content {
    height: 100vh;
    border: none;
    border-radius: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow: hidden;
}

.help-modal-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
}

.help-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.help-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.help-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.help-modal-body {
    overflow-y: auto;
    padding: 3rem 0;
    height: calc(100vh - 200px);
}

.help-content {
    max-width: 1200px;
    margin: 0 auto;
}

.help-section {
    margin-bottom: 4rem;
}

.help-section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.help-section-title i {
    color: #F472B6;
}

/* 주요 기능 카드 */
.help-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.help-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.help-card-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #F472B6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.help-card h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.help-card p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* 단축키 리스트 */
.shortcut-list {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-item kbd {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 50px;
    text-align: center;
}

.shortcut-item span {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
}

/* 사용 방법 단계 */
.help-step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.help-step:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.step-number {
    width: 60px;
    height: 60px;
    background: #F472B6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(244, 114, 182, 0.4);
}

.step-content h5 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.6;
}

/* 팁 그리드 */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.tip-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.tip-item i {
    font-size: 1.5rem;
    color: #F472B6;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.tip-item span {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
}

/* 도움말 모달 푸터 */
.help-modal-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.help-modal-footer .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.help-modal-footer .btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* 스크롤바 스타일링 */
.help-modal-body::-webkit-scrollbar {
    width: 12px;
}

.help-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.help-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.help-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .help-title {
        font-size: 1.8rem;
    }
    
    .help-subtitle {
        font-size: 1rem;
    }
    
    .help-section-title {
        font-size: 1.5rem;
    }
    
    .help-card {
        padding: 1.5rem;
    }
    
    .help-card-icon {
        font-size: 3rem;
        height: 80px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .help-modal-body {
        padding: 2rem 1rem;
    }
}

/* 애니메이션 효과 */
body.help-modal-open {
    overflow: hidden;
}

.help-modal.show .help-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.help-modal.show .help-card:nth-child(1) {
    animation-delay: 0.1s;
}

.help-modal.show .help-card:nth-child(2) {
    animation-delay: 0.2s;
}

.help-modal.show .help-card:nth-child(3) {
    animation-delay: 0.3s;
}

.help-modal.show .help-step {
    animation: fadeInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.help-modal.show .help-step:nth-child(1) {
    animation-delay: 0.1s;
}

.help-modal.show .help-step:nth-child(2) {
    animation-delay: 0.2s;
}

.help-modal.show .help-step:nth-child(3) {
    animation-delay: 0.3s;
}

.help-modal.show .help-step:nth-child(4) {
    animation-delay: 0.4s;
}

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

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