
/* --- Global Variables & Reset --- */
:root {
--bg: #ffffff;
--text: #0f172a; /* 명도 대비 향상 (기존보다 진함) */
--muted: #475569; /* 명도 대비 향상 (기존 #64748b 대비 진함) */
--line: #e2e8f0;
--brand: #172554;
--accent: #4f46e5;
--accent-soft: #eef2ff;
--accent2: #4338ca;
--font-main: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
--success-bg: #dcfce7;
--success-text: #14532d; /* 명도 대비 향상 */
}

/* Accessibility Focus Styles */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

button { font-family: inherit; cursor: pointer; border: none; background: transparent; }

/* --- Hero --- */
.hero { padding: 50px 0 30px; text-align: left; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; color: var(--brand); letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.05rem; }

/* --- Main Layout --- */
.section { padding: 40px 0 80px; }
.layout { display: flex; gap: 40px; align-items: flex-start; }
.content { flex: 1; min-width: 0; }
.support { width: 280px; flex-shrink: 0; position: sticky; top: 90px; }

/* --- Dashboard & Stats --- */
.dashboard-card {
    background: #fff; border-radius: 20px; padding: 24px;
    border: 1px solid var(--line); margin-bottom: 30px;
}
@media only screen and (min-width: 641px) {
  .rating-stats { display: flex; gap: 30px; align-items: center; }
}
.score-box { text-align: center; min-width: 120px; }
@media only screen and (max-width: 640px) {
  .score-box { margin-bottom: 20px; }
}
.score-big { font-size: 42px; font-weight: 800; color: var(--brand); line-height: 1; }
.score-stars { color: #fbbf24; font-size: 18px; margin: 6px 0; letter-spacing: -2px; }
.score-count { font-size: 13px; color: var(--muted); }
.bars-box { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: flex; align-items: center; font-size: 13px; color: var(--muted); gap: 10px; }
.bar-bg { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: #fbbf24; border-radius: 4px; }

/* --- Filter & Search --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; justify-content: space-between; align-items: center; }
.filter-group { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.custom-select, .search-input {
padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
font-size: 15px; color: var(--text); background: #fff; font-family: inherit; transition: 0.2s;
appearance: none; -webkit-appearance: none; min-height: 48px; /* 터치 타겟 확보 */
}
.custom-select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; cursor: pointer;
max-width: 260px;
}
.custom-select:hover, .search-input:hover, .search-input:focus { border-color: var(--accent); outline: none; }

.search-wrapper { position: relative; width: 100%; max-width: 280px; }
.search-input { width: 100%; padding-right: 40px; }
.search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* --- Review List --- */
.review-list { display: flex; flex-direction: column; gap: 16px; min-height: 500px; }

.review-card {
background: #fff; border-radius: 16px; padding: 24px;
border: 1px solid var(--line); transition: all 0.2s;
display: flex; flex-direction: column; position: relative;
}
.review-card.best-review { border: 2px solid #fed7aa; background: #fffbf7; }
.review-card:hover { border-color: #94a3b8; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.user-info { display: flex; align-items: center; gap: 10px; }
.user-name { font-size: 16px; font-weight: 700; color: var(--text); }
.user-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.user-meta span::before { content: "|"; margin-right: 8px; color: #e2e8f0; }
.user-meta span:first-child::before { content: none; }
.card-rating { color: #fbbf24; font-weight: 700; font-size: 15px; letter-spacing: 1px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 6px; font-weight: 600; }
.badge-rate { background: var(--success-bg); color: var(--success-text); }
.badge-item { background: #f1f5f9; color: #475569; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-best { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }


/* --- Review Title & Best Icons --- */
.review-title-row{
display:flex; align-items:center; gap:10px;
margin: 2px 0 10px;
}
.review-title{
font-size: 17px;
font-weight: 800;
letter-spacing: -0.02em;
color: var(--brand);
line-height: 1.35;
}
.best-icon{
display:inline-flex; align-items:center; justify-content:center;
min-width: 34px; height: 34px; padding: 0 10px;
border-radius: 999px;
font-size: 12px; font-weight: 800;
border: 1px solid transparent;
white-space: nowrap;
}
.best-icon.monthly{ background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.best-icon.yearly{ background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
/* --- Review Content --- */
.review-content { position: relative; margin-bottom: 0; }
.review-text {
font-size: 16px; line-height: 1.6; color: #334155;
max-height: 3.2em; overflow: hidden; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-box-orient: vertical;
word-break: break-all; transition: max-height 0.3s ease;
}
.review-text.expanded { max-height: none; -webkit-line-clamp: unset; display: block; }

.btn-toggle-wrapper {
position: absolute; bottom: 0; right: 0; display: none;
/* background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30%);  <- 기존 그라데이션 배경 제거 */
background: none; /* 배경을 투명하게 설정하여 원본 배경색이 보이도록 수정 */
padding-left: 30px;
}
.review-text.expanded + .btn-toggle-wrapper { position: relative; text-align: right; background: none; padding: 10px 0 0 0; }
.btn-toggle { font-size: 14px; color: var(--brand); font-weight: 700; cursor: pointer; padding: 4px; }
.btn-toggle:hover { text-decoration: underline; }

/* External Link Button */
.external-link-btn {
display: inline-flex; align-items: center; gap: 6px;
margin-top: 16px; padding: 12px 16px;
background: #ecfdf5; border: 1px solid #6ee7b7; border-radius: 8px;
font-size: 14px; color: #047857; font-weight: 700; text-decoration: none;
width: fit-content; transition: 0.2s;
}
.external-link-btn:hover { background: #d1fae5; transform: translateY(-1px); }

/* --- Card Footer --- */
.card-footer {
margin-top: 12px; padding-top: 0; border-top: none;
display: flex; justify-content: flex-end; align-items: center;
background: transparent; /* 회색 배경 제거를 위한 명시적 투명 배경 설정 */
}

.btn-helpful {
display: flex; align-items: center; gap: 6px;
padding: 8px 16px;
border-radius: 999px;
border: 1px solid #e2e8f0;
font-size: 13px; color: var(--muted); font-weight: 500;
transition: all 0.2s; background: #ffffff; cursor: pointer;
box-shadow: 0 1px 2px rgba(0,0,0,0.02); min-height: 36px;
}
.btn-helpful:hover { background: #f8fafc; border-color: #cbd5e1; color: var(--text); }
.btn-helpful.active { color: var(--accent); font-weight: 700; border-color: var(--accent); background: var(--accent-soft); }
.btn-helpful svg { width: 16px; height: 16px; fill: currentColor; }

/* --- Pagination & Sidebar --- */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.page-btn {
min-width: 44px; height: 44px; border-radius: 10px;
border: 1px solid #e2e8f0; background: #fff; color: var(--muted);
font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
transition: 0.2s; font-size: 14px; text-decoration: none;
}
.page-btn:hover { background: #f1f5f9; color: var(--text); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn.disabled { opacity: 0.5; cursor: not-allowed; }
.page-btn.disabled:hover { background: #fff; color: var(--muted); }
.page-btn.dots { border: none; background: transparent; cursor: default; min-width: 32px; }
.page-btn.dots:hover { background: transparent; color: var(--muted); }

/* Sidebar & Footer */
.support-card { background: #f8fafc; border-radius: 20px; padding: 24px; border: 1px solid #e2e8f0; }
.subnav { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.subnav a { display: flex; justify-content: center; align-items: center; padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; font-weight: 600; text-align: center; color: var(--brand); transition: 0.2s; font-size: 0.95rem; }
.subnav a:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1); }
.subnav a.current { border-color:var(--brand); color:var(--brand); background:#f3f7ff; }
.info-txt { font-size: 14px; color: var(--muted); line-height: 1.6; padding-top: 20px; border-top: 1px solid #e2e8f0; }

/* --- Mobile Optimization --- */
@media only screen and (max-width: 640px) {
  .layout { display: block; margin: 0 5vw; }
  .support { width: 100%; position: static; margin-top: 50px; }
  .hero { text-align: center; }
  .hero h1 { font-size: 28px; }

.rating-stats { flex-direction: column; align-items: flex-start; gap: 20px; }

.filter-bar { gap: 10px; }
.filter-group { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-group > :first-child { grid-column: 1 / -1; }
.custom-select, .search-input { width: 100%; }

.search-wrapper { max-width: 100%; width: 100%; margin-top: 4px; }

.review-card { padding: 20px; }
.card-header { flex-direction: column; align-items: flex-start; gap: 6px; }
.card-rating { align-self: flex-start; margin-top: 4px; }
.review-text { font-size: 15px; }
.review-title{ font-size: 16px; }
.best-icon{ min-width: 32px; height: 32px; padding: 0 10px; }
}

