/* 변수 선언 */
:root {
    --primary-color: #00c471;
    --primary-hover: #00a65a;
    --primary-light: #e8f7f0;
    --secondary-color: #f1f3f5;
    --accent-color: #3e7bfa;
    --accent-light: #e7f1ff;
    --text-color: #2d3748;
    --text-secondary: #718096;
    --text-muted: #a0aec0;
    --bg-color: #ffffff;
    --container-bg: #f7fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --rank-up-color: #e53e3e;
    --rank-down-color: #3182ce;
    --success-color: #38a169;
    --warning-color: #dd6b20;
    --error-color: #e53e3e;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --font-main: 'Noto Sans KR', sans-serif;
    --shadow-sm: 0 2px 4px var(--shadow-color);
    --shadow-md: 0 4px 12px var(--shadow-color);
    --shadow-lg: 0 8px 24px var(--shadow-color);
  }
  
  .dark-mode {
    --primary-color: #48bb78;
    --primary-hover: #38a169;
    --primary-light: rgba(72, 187, 120, 0.1);
    --secondary-color: #2d3748;
    --accent-color: #4299e1;
    --accent-light: rgba(66, 153, 225, 0.1);
    --text-color: #f7fafc;
    --text-secondary: #cbd5e0;
    --text-muted: #a0aec0;
    --bg-color: #1a202c;
    --container-bg: #2d3748;
    --card-bg: #2d3748;
    --border-color: #4a5568;
    --border-light: #2d3748;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --rank-up-color: #fc8181;
    --rank-down-color: #63b3ed;
    --success-color: #68d391;
    --warning-color: #f6ad55;
    --error-color: #fc8181;
  }
  
/* 기본 리셋 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    line-height: 1.3;
    font-weight: 700;
  }
  
  p {
    margin-bottom: 1rem;
  }
  
  a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  
  a:hover {
    color: var(--primary-color);
  }

  /* 전역 아이콘 정렬 */
  i.fas, i.far, i.fab {
    vertical-align: middle;
  }
  
/* 레이아웃 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
  }

  .container.main {
    padding-top: 0;
  }
  
  header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 0;
    position: relative;
    background-color: var(--container-bg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
  }
  
  .site-title {
    color: var(--primary-color);
    font-size: 2.4rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
  }
  
  section {
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-in-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
/* 테마 토글 */
#theme-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
  }
  
  #theme-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
  }
  
  .theme-icon {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    transition: fill var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  #lightIcon {
    display: none;
  }
  .dark-mode #lightIcon {
    display: block;
  }
  .dark-mode #darkIcon {
    display: none;
  }

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background-color: transparent;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    padding: 0 8px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-item a i {
    margin-right: 4px; /* fallback for gap */
    vertical-align: middle;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 500;
}

.breadcrumb-item span {
    color: var(--text-secondary);
}

.dark-mode .breadcrumb-nav {
    background-color: var(--container-bg);
}
  
/* 검색 섹션 */
#search-section {
    margin-bottom: 40px;
  }
  
  form {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  }
  
  form:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
  }
  
  input[type="text"],
  input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  }
  
  input[type="text"]:focus,
  input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 196, 113, 0.2);
  }
  
  .search-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .search-controls button {
    margin-left: auto;
  }
  
  .turnstile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 0;
  }
  
  .turnstile-container .cf-turnstile {
    margin: 0;
  }
  
  .toggle-container {
    display: flex;
    align-items: center;
  }
  
  .toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
  }
  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  .slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  input:checked + .slider {
    background-color: var(--primary-color);
  }
  input:checked + .slider:before {
    transform: translateX(26px);
  }
  
/* 버튼 기본 스타일 (공통) */
button,
  .new-search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
  }
  button[type="submit"] {
    padding: 12px 24px;
    font-size: 16px;
    letter-spacing: 0.5px;
  }
  button:hover,
  .new-search-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  button:active,
  .new-search-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }
  
  button:focus,
  .new-search-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 196, 113, 0.3);
  }
  
/* 검색 히스토리 */
.search-history-container {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
  }
  .search-history-container h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
  }
  #searchHistory {
    list-style: none;
  }
  #searchHistory li {
    background-color: var(--bg-color);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
  }
  #searchHistory li:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
  }
  .history-item {
    cursor: pointer;
    flex-grow: 1;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--accent-color);
    text-decoration: underline;
    transition: color var(--transition-fast);
  }

  .history-item:hover {
    color: var(--primary-color);
    text-decoration: underline;
    background-color: transparent;
  }
  .delete-history {
    background-color: var(--text-muted);
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    margin-left: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    min-width: 60px;
  }
  .delete-history:hover {
    background-color: var(--error-color);
    transform: translateY(-1px) scale(1.02);
    box-shadow: var(--shadow-md);
  }
  .delete-history:active {
    transform: translateY(0) scale(1);
  }
  
/* 결과 섹션 */
#results-section {
    margin-top: 40px;
    /* display: none; /* JavaScript will control initial visibility based on params */
  }

  .results-header {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .results-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.3;
  }
  
  .result-count-highlight {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 2px;
    font-weight: 800;
  }
  #results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }
  .item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
  }
  .item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
  }
  .item h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    line-height: 1.4;
  }
  .item p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
  }
  .item p strong {
    color: var(--text-color);
    font-weight: 600;
  }
  .item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    padding: 8px 0;
    display: inline-block;
    transition: all var(--transition-fast);
  }
  .item a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
  }
  
/* 순위 관련 */
.rank-history {
    margin-top: 15px;
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
  }
  .rank-history h4 {
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 600;
  }
  .rank-up {
    color: var(--rank-up-color);
    font-weight: 600;
  }
  .rank-down {
    color: var(--rank-down-color);
    font-weight: 600;
  }
  .clear-history {
    display: inline-flex;
    align-items: center;
    background-color: var(--secondary-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-top: 12px;
    margin-left: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-decoration: none;
  }
  
  .clear-history::before {
    content: '🗑️';
    margin-right: 6px;
    font-size: 0.9rem;
  }
  
  .clear-history:hover {
    background-color: var(--text-muted);
    color: white;
    border-color: var(--text-muted);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
  
  .clear-history:active {
    transform: translateY(0);
  }
  
/* 히어로 섹션 */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }

/* 검색 정보 배너 */
.search-info-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 25px 0;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
  }
  
  .search-info-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .search-query, .search-mall {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    letter-spacing: -0.2px;
  }
  
  .search-query i, .search-mall i {
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  
  /* 결과 액션 버튼 */
  .results-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--card-bg), var(--secondary-color));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: relative;
  }

  .results-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
  }

  @media (max-width: 768px) {
    .results-actions {
      justify-content: center;
    }
  }
  
  .action-button {
    padding: 14px 28px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
    cursor: pointer;
    min-width: 150px;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }

  .action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
  }
  
  .action-button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .action-button:hover::before {
    left: 100%;
  }

  .action-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
  }

  .action-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    position: relative;
  }

  .action-button.active::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
  }

  .action-button.active:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  
  .action-button i {
    font-size: 1rem;
    vertical-align: middle;
    flex-shrink: 0;
  }
  
  .hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  
  .hero-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
  }

/* 사용 방법 섹션 */
.how-to-use-section {
    background-color: var(--card-bg);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    margin: 50px 0;
    box-shadow: var(--shadow-md);
  }
  
  .how-to-use-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 1.8rem;
  }
  
  .highlight-text {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 2px;
    font-weight: 800;
  }
  
  .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
  }
  
  .step-item {
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    position: relative;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
  }
  
  .step-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
  }
  
  .step-number {
    background-color: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
  }
  
  .step-content {
    flex-grow: 1;
  }
  
  .step-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
  }
  
  .step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
  }
  
  .step-image {
    text-align: center;
    color: var(--primary-color);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .step-image i {
    vertical-align: middle;
  }
  
  .tips-container {
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
  }
  
  .tips-container h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
  }
  
  .tips-list {
    list-style: none;
    padding: 0;
  }
  
  .tips-list li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
  }
  
  .tips-list li i {
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--primary-color);
  }
  
  .tips-list li strong {
    color: var(--text-color);
    font-weight: 600;
  }

/* 푸터 */
footer {
    padding: 40px 0;
    color: var(--text-color);
    background-color: var(--container-bg);
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
  }
  
  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  
  .footer-logo h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 5px;
  }
  
  .footer-logo p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  
  .footer-links {
    display: flex;
    gap: 20px;
  }
  
  .footer-links a {
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition-fast);
  }
  
  .footer-links a:hover {
    color: var(--primary-color);
  }
  
  .copyright {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 20px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
  }
  
/* 애니메이션 */
@keyframes fadeInOut {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
/* 로드 더보기 버튼 */
.load-more {
    display: block;
    width: 220px;
    height: 60px;
    margin: 30px auto;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 60px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: none;
    position: relative;
    overflow: hidden;
  }
  
  .load-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
  }
  
  .load-more:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }
  
  .load-more:hover::before {
    left: 100%;
  }
  
  .load-more:active {
    transform: translateY(-1px);
  }
  
  /* 정보 없음 스타일 */
.no-info {
  color: #888;
  font-style: italic;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.dark-mode .no-info {
  background-color: rgba(255, 255, 255, 0.1);
  color: #aaa;
}

/* 순위 히스토리 내용 */
.rank-history-content {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rank-history-content h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-history-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rank-history-content li {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    transition: background-color 0.2s ease;
}

.rank-history-content li:last-child {
    border-bottom: none;
}

.rank-history-content li:hover {
    background-color: rgba(128, 128, 128, 0.05);
}

.past-rank {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.rank-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.rank-up {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.rank-down {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.rank-no-change {
    color: #95a5a6;
    background: rgba(149, 165, 166, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

.rank-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* 다크 모드 스타일 조정 */
.dark-mode .rank-history-content {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mode .rank-history-content li {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .rank-history-content li:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.dark-mode .rank-up {
    color: #00ff95;
    background: rgba(0, 255, 149, 0.1);
}

.dark-mode .rank-down {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.dark-mode .rank-no-change {
    color: #7f8c8d;
    background: rgba(127, 140, 141, 0.1);
}

/* 현재 순위 표시 스타일 */
.current-rank-container {
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.dark-mode .current-rank-container {
    background: rgba(52, 152, 219, 0.05);
}

.current-rank {
    font-weight: 700;
    color: #3498db;
    font-size: 1.1rem;
}

.dark-mode .current-rank {
    color: #5dade2;
}

/* 추가 정보 섹션 */
.info-section {
    background-color: var(--container-bg);
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  .info-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
  }
  .info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
  }
  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
  }
  .info-item {
    background-color: var(--bg-color);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
  }
  .info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
  }
  .info-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
  }
  .info-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
  }
  .info-item p strong {
    color: var(--text-color);
    font-weight: 600;
  }
  
  /* FAQ 섹션 */
  .faq-section {
    background-color: var(--container-bg);
    padding: 40px 20px;
    margin-top: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  .faq-section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
  }
  .faq-accordion {
    max-width: 800px;
    margin: 0 auto;
  }
  .faq-item {
    background-color: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
  }
  .faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
  }
  .faq-question {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-fast);
  }
  .faq-question:hover {
    background-color: rgba(0, 196, 113, 0.05);
  }
  .faq-question h3 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }
  .faq-question h3 i {
    color: var(--primary-color);
    vertical-align: middle;
    flex-shrink: 0;
  }
  .faq-toggle {
    color: var(--primary-color);
    transition: transform var(--transition-fast);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-left: 16px;
  }
  .faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-top: 0 solid var(--border-color);
  }
  .faq-item.active .faq-answer {
    padding: 0 24px 24px;
    max-height: 1000px;
    border-top: 1px solid var(--border-color);
  }
  .faq-item.active .faq-toggle {
    transform: rotate(180deg);
  }
  .faq-answer p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }
  .faq-answer p i {
    color: var(--primary-color);
    margin-top: 3px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  
  /* 스크롤 인디케이터 */
  .scroll-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    width: 80%;
    max-width: 300px;
  }
  .scroll-indicator.show {
    opacity: 1;
    animation: blink 1s infinite alternate, bounce 2s infinite;
  }
  .scroll-indicator:hover {
    background-color: var(--secondary-color);
    animation: none;
  }
  .scroll-indicator::after {
    content: '↓';
    margin-left: 5px;
    font-size: 1.2em;
  }
  
  @keyframes blink {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
  }
  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
  }
  
  /* 결과 보기 버튼 */
  #show-results-btn {
    display: block;
    width: 80%;
    max-width: 400px;
    height: 60px;
    margin: 30px auto;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 60px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  #show-results-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
  }
  #show-results-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.1);
  }
  
/* 새 검색 컨테이너 및 버튼 */
  .new-search-container {
    text-align: center;
    margin: 20px 0;
  }
  
  /* 검색 없음 안내 */
.no-search-info, #global-no-search-alert {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, var(--card-bg), var(--primary-light));
    border-radius: var(--radius-lg);
    margin: 30px auto;
    max-width: 650px;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    position: relative;
  }

  .no-search-info::before, #global-no-search-alert::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
.no-search-info p, #global-no-search-alert p {
    font-size: 1.05em;
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text-color);
  }
#global-no-search-alert p:first-of-type {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}
#global-no-search-alert .fa-info-circle {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.no-search-info .new-search-button, 
#global-no-search-alert .new-search-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.no-search-info .new-search-button:hover,
#global-no-search-alert .new-search-button:hover,
.no-search-info .new-search-button:focus,
#global-no-search-alert .new-search-button:focus {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    outline: none;
}
.no-search-info .new-search-button i,
#global-no-search-alert .new-search-button i {
    margin-right: 5px;
}

/* 미디어 쿼리 */
@media (max-width: 768px) {
    .container { padding: 15px; }
    .site-title { font-size: 1.8rem; }
    #results { grid-template-columns: 1fr; }
    .search-controls { flex-direction: column; align-items: stretch; gap: 15px;}
    .search-controls button { margin-left: 0; width: 100%;}
    .toggle-container { margin-bottom: 0; justify-content: center; }
    
    /* Breadcrumb 모바일 최적화 */
    .breadcrumb {
        font-size: 0.8rem;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        padding: 0 6px;
    }
    
    /* 검색 정보 배너 모바일 최적화 */
    .search-info-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #show-results-btn {
      width: 90%;
      height: 50px;
      font-size: 16px;
      line-height: 50px;
      margin: 20px auto;
    }
    .info-grid, .faq-accordion,
    .steps-container,
    .content-grid { grid-template-columns: 1fr; }
    
    .faq-question {
        padding: 16px 20px;
    }
    
    .faq-question h3 {
        font-size: 1.05rem;
        gap: 10px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 20px;
    }
    
    .faq-answer {
        padding: 0 20px;
    }
    .scroll-indicator { bottom: 10px; padding: 8px 12px; font-size: 14px; }
    
    .hero-section { padding: 40px 0; }
    .hero-content h2 { font-size: 1.8rem; }
    .hero-content p { font-size: 1rem; }
    
    .steps-container { grid-template-columns: 1fr; }
    .step-item { padding: 20px; }
    
    .search-info-content {
      flex-direction: column;
      gap: 10px;
      align-items: stretch;
    }
    .search-query, .search-mall {
        justify-content: center;
    }
    
    .results-actions {
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 15px;
    }
    
    .action-button {
      width: 100%;
      max-width: 280px;
      justify-content: center;
    }
    
    .footer-content {
      flex-direction: column;
      text-align: center;
      gap: 20px;
    }
    
    .footer-links {
      justify-content: center;
    }
    #global-no-search-alert .fa-info-circle {
        font-size: 2em;
    }
    #global-no-search-alert p {
        font-size: 1em;
    }
    #global-no-search-alert .new-search-button {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    /* 로딩 모달 모바일 대응 */
    .loading-modal {
        min-width: 280px;
        padding: 30px 20px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .loading-text {
        font-size: 1em;
    }
}
  
@media (max-width: 480px) {
    .site-title { font-size: 1.5rem; }
    #show-results-btn {
      width: 95%;
      height: 45px;
      font-size: 15px;
      line-height: 45px;
      margin: 15px auto;
    }
    
    .hero-content h2 { font-size: 1.5rem; }
    .step-number { width: 35px; height: 35px; font-size: 1rem; }

    .search-query, .search-mall {
        font-size: 1rem;
        padding: 8px 15px;
    }
    .results-title {
        font-size: 1.5rem;
    }
    .item h3 {
        font-size: 1.1rem;
    }
    .item p {
        font-size: 0.9rem;
    }
}

/* 전체 스타일 END */

/* 로딩 모달 스타일 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-modal {
    background-color: var(--card-bg, #ffffff);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 300px;
    max-width: 400px;
    border: 1px solid var(--border-color, #e9ecef);
    animation: modalFadeIn 0.3s ease-out;
}

.dark-mode .loading-modal {
    background-color: var(--card-bg, #252525);
    border-color: var(--border-color, #495057);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.loading-spinner {
    border: 4px solid var(--secondary-color, #f3f3f3);
    border-top: 4px solid var(--primary-color, #00c471);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: var(--text-color, #333);
    font-size: 1.1em;
    font-weight: 500;
    text-align: center;
    margin: 0;
    font-family: var(--font-main, 'Noto Sans KR', sans-serif);
}

.dark-mode .loading-text {
    color: var(--text-color, #f8f9fa);
}

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