:root {
    /* 기존 컬러 팔레트 유지 */
    --primary-color: #3273dc;
    --primary-light: #eef7ff;
    --primary-hover: #2366c9;
    --primary-dark: #1a4f99;
    --accent-color: #00d1b2;
    --danger-color: #f14668;
    --bg-color: #f9fafc;
    --text-color: #2c3e50;
    --text-light: #718096;
    --text-lighter: #a0aec0;
    --border-color: #e2e8f0;
    --border-radius: 10px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    --section-spacing: 2.5rem;
}

/* 기본 스타일 */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* 타이틀 섹션 개선 */
.title-section {
    text-align: center;
    margin-bottom: 3.5rem;
    position: relative;
}

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
}

.page-title:after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

/* 정보 및 카운터 영역 */
.info-row {
    display: flex;
    gap: 2rem;
    margin-bottom: var(--section-spacing);
    flex-wrap: wrap;
}

.info-box,
.counter-box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 250px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 280px;
    height: 100%;
}

.info-box:hover,
.counter-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.info-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.info-title i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.info-list {
    padding-left: 0;
    list-style: none;
}

.info-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
    position: relative;
    color: var(--text-light);
    padding-left: 1.5rem;
    font-size: 1.0625rem;
}

.info-list li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
    top: 0;
}

.counter-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

.counter-details {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.counter-details > div {
    text-align: center;
}

/* 숫자 표시 개선 */
.counter-label {
    font-size: 1.0625rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.counter-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-container {
    margin-top: 1.75rem;
}

/* 프로그래스 바 스타일 개선 */
.progress {
    height: 0.875rem;
    background-color: #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    width: 100%;
}

.progress.is-info::-webkit-progress-bar {
    background-color: #e8eef7;
}

.progress.is-info::-webkit-progress-value {
    background-color: var(--primary-color);
    background-image: linear-gradient(45deg, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from { background-position: 1rem 0; }
    to { background-position: 0 0; }
}

.progress.is-info::-moz-progress-bar {
    background-color: var(--primary-color);
}

/* 입력 패널 개선 */
.input-panel {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    margin-bottom: var(--section-spacing);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.input-panel:hover {
    box-shadow: var(--box-shadow-hover);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-title i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.375rem;
}

/* 입력 레이아웃 수정 - 상하 배치로 변경 */
.input-row {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 1.5rem;
}

.input-field {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative; /* 자동완성 위치 기준 */
}

.input-field.mid-field {
    max-width: 100%;
}

.field-label {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    text-align: left !important;
}

.custom-input {
    width: 100%;
    padding: 0.9375rem 1.25rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    color: var(--text-color);
    background-color: #fff;
}

.custom-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.15);
}

/* 라디오 버튼 그리드 레이아웃 수정 */
.control {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    background-color: #f9fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* 라디오 버튼 중앙 정렬 수정 */
.radio {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    margin: 0;
    background-color: white;
    border: 1px solid var(--border-color);
}

.radio:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

/* 라디오 버튼과 텍스트 중앙 정렬 */
.radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    margin-right: 0.625rem;
    background-color: #fff;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    top: 0; /* 수직 정렬 조정 */
    vertical-align: middle;
}

.radio input[type="radio"]:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    box-shadow: 0 0 0 2px #fff inset;
}

.radio input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(50, 115, 220, 0.2);
}

.radio + .radio {
    margin-left: 0 !important;
}

/* 자동완성 제안 스타일 개선 */
.suggestions {
    position: absolute;
    z-index: 10;
    width: 100%;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--box-shadow-hover);
    margin-top: 0.25rem;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    top: calc(100% + 5px); /* 입력 필드 바로 아래 위치 */
    left: 0;
}

.suggestions.active {
    display: block;
}

.suggestions div {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    background-color: white; /* 배경색 명시적 지정 */
}

.suggestions div:last-child {
    border-bottom: none;
}

.suggestions div:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* 버튼 스타일 개선 */
.register-btn {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex; /* 인라인 플렉스에서 플렉스로 변경 */
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: auto;
    min-width: 180px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.0625rem;
    letter-spacing: 0.02em;
    text-align: center; /* 가운데 정렬 명시 */
}

.register-btn i {
    font-size: 1.125rem;
    display: inline-block; /* 아이콘 표시 방식 지정 */
    vertical-align: middle; /* 수직 중앙 정렬 */
}

.register-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.register-btn:active {
    background-color: var(--primary-dark);
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 차트 및 테이블 섹션 */
.slots-panel {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2.5rem;
    margin-bottom: var(--section-spacing);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.slots-panel:hover {
    box-shadow: var(--box-shadow-hover);
}

.slots-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.slots-title i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.375rem;
}

/* 차트 스타일 */
canvas {
    margin-top: 1.5rem;
    border-radius: var(--border-radius);
    background-color: white;
    max-height: 400px;
}

/* DataTables 스타일 개선 */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.5rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    padding: 0.5rem;
    border-color: var(--border-color);
    background-color: white;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    margin-left: 0.5rem;
}

/* 알림 스타일 */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 400px;
    background-color: white !important;
}

.notification.is-danger {
    background-color: white !important;
    border-left: 4px solid var(--danger-color);
    color: var(--text-color);
}

.notification p {
    margin-right: 1rem;
}

.notification button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.notification button:hover {
    background-color: var(--primary-hover);
}

/* 반응형 스타일 */
@media (min-width: 992px) {
    /* 대형 화면에서는 가로 배치 허용 (옵션) */
    .input-field#keyword-section,
    .input-field#place-section {
        width: 48%;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .info-row,
    .counter-details {
        flex-direction: column;
    }
    
    .page-title {
        font-size: 1.875rem;
    }
    
    .panel-title, 
    .slots-title {
        font-size: 1.375rem;
    }
    
    .input-panel,
    .slots-panel {
        padding: 1.75rem;
    }
    
    /* .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        text-align: left !important;
        float: none !important;
        margin-bottom: 1rem;
        display: block;
        width: 100%;
    } */
}

@media (max-width: 576px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .counter-details {
        flex-direction: column;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    /* 테이블 반응형 스크롤 */
    .slots-panel {
        padding: 1.5rem 1rem;
    }
    
    .dataTables_wrapper {
        overflow-x: auto;
    }
}

/* 테이블 스타일 - 흰색 배경 통일 */
table.dataTable,
table.dataTable thead,
table.dataTable tbody,
table.dataTable th,
table.dataTable td,
table.dataTable tr {
    background-color: white !important;
    border-color: var(--border-color) !important;
}

/* 테이블 헤더 */
table.dataTable thead th {
    background-color: white !important;
    color: var(--text-color) !important;
    font-weight: 600 !important;
    padding: 1rem 0.75rem !important;
    border-bottom: 2px solid var(--primary-color) !important;
    text-align: left !important;
}

/* 테이블 셀 내용 왼쪽 정렬 */
table.dataTable tbody td,
table.dataTable thead th {
    text-align: left !important;
    vertical-align: middle !important;
    white-space: nowrap !important; /* 텍스트 줄바꿈 방지 */
}

/* 테이블 셀 */
table.dataTable tbody td {
    padding: 0.875rem 0.75rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    font-size: 0.9375rem !important;
    background-color: white !important;
}

/* 각 컬럼별 너비 조정 */
table.dataTable thead th:nth-child(1), /* 날짜 */
table.dataTable tbody td:nth-child(1) {
    width: 15% !important;
    min-width: 100px !important;
}

table.dataTable thead th:nth-child(2), /* 상품명 */
table.dataTable tbody td:nth-child(2) {
    width: 30% !important;
    min-width: 150px !important;
}

table.dataTable thead th:nth-child(3), /* 순위 */
table.dataTable tbody td:nth-child(3),
table.dataTable thead th:nth-child(4), /* 영수증 */
table.dataTable tbody td:nth-child(4),
table.dataTable thead th:nth-child(5), /* 블로그 */
table.dataTable tbody td:nth-child(5),
table.dataTable thead th:nth-child(6), /* 저장 */
table.dataTable tbody td:nth-child(6) {
    width: 10% !important;
    min-width: 80px !important;
    text-align: center !important; /* 숫자 데이터는 중앙 정렬 */
}

/* 짝수/홀수 행 스타일 통일 */
table.dataTable tr.odd,
table.dataTable tr.even,
table.dataTable tr.odd td,
table.dataTable tr.even td {
    background-color: white !important;
    box-shadow: none !important;
}

/* 호버 효과만 유지 */
table.dataTable tr:hover,
table.dataTable tr:hover td {
    background-color: var(--primary-light) !important;
}

/* 테이블 레이아웃 고정 */
table.dataTable {
    table-layout: fixed !important;
    width: 100% !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    margin-bottom: 1rem !important;
}

/* 셀 내용 넘침 처리 */
table.dataTable td {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 페이지네이션 스타일 */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem !important;
    padding-top: 0.5rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 0.25rem !important;
    padding: 0.5rem 0.75rem !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
    background-color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border: 1px solid var(--primary-color) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important;
}

/* 테이블 헤더와 데이터 사이 중복 요소 제거 */
.dataTables_scrollBody table.dataTable thead {
    display: none !important; /* 데이터 영역에서 중복된 헤더 숨김 */
}

/* 헤더와 데이터 영역 간격 제거 */
.dataTables_scrollHead {
    border-bottom: none !important;
    margin-bottom: -1px !important; /* 경계 겹침 방지 */
}

.dataTables_scrollBody {
    margin-top: 0 !important;
    border-top: none !important;
}

/* 헤더 영역 정리 */
.dataTables_scrollHeadInner {
    padding-right: 0 !important; /* 스크롤바 공간 조정 */
}

/* 테이블 경계 조정 */
.dataTables_wrapper table.dataTable {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 헤더와 본문 사이에 간격이 생기는 것 방지 */
.dataTables_wrapper .dataTables_scroll {
    background: white !important;
}

/* 검색 및 페이지 길이 선택 입력 필드 */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    padding: 0.5rem !important;
    background-color: white !important;
}