/* =====================
   Tool 랭킹 - 2열 레이아웃
   ===================== */

/* 2열 레이아웃 컨테이너 */
.tools-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    min-height: calc(100vh - 120px);
}

/* =====================
   좌측 사이드바
   ===================== */
.tools-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 발굴 배너 */
.discover-banner {
    display: block;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.discover-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.discover-banner strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    line-height: 1.4;
    word-break: keep-all;
}

.discover-banner small {
    display: block;
    font-size: 11px;
    color: #a16207;
    margin-top: 4px;
}

.sidebar-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.sidebar-header .tools-count {
    font-size: 0.75rem;
    color: #888;
}

/* 사이드바 탭 */
.sidebar-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 3px;
}

.sidebar-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s;
}

.sidebar-tab:hover {
    color: #333;
}

.sidebar-tab.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-tab.ai.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* 사이드바 네비게이션 */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav.hidden {
    display: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.sidebar-item:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.sidebar-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.sidebar-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.sidebar-label {
    flex: 1;
}

/* AI 카테고리 스타일 */
.ai-nav .sidebar-item.ai-item {
    background: #faf8ff;
}

.ai-nav .sidebar-item.ai-item:hover {
    background: #f0ebff;
}

.ai-nav .sidebar-item.ai-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* 사이드바 메뉴 */
.sidebar-menu {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-menu.top {
    margin-top: 0;
    margin-bottom: 16px;
    padding-top: 0;
    padding-bottom: 12px;
    border-top: none;
    border-bottom: 1px solid #eee;
    flex-direction: row;
    justify-content: space-between;
}

.sidebar-menu.top .sidebar-menu-item {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.8rem;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.sidebar-menu-item:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

/* =====================
   우측 메인 콘텐츠
   ===================== */
.tools-main {
    min-width: 0;
}

.tools-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.topbar-title {
    flex: 1;
}

.current-category {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.topbar-actions {
    display: flex;
    gap: 6px;
}

.topbar-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    color: #555;
    transition: all 0.15s;
    white-space: nowrap;
}

.topbar-btn:hover {
    background: #667eea;
    color: #fff;
    text-decoration: none;
}

.topbar-btn.has-tooltip {
    position: relative;
}

.btn-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    animation: pulse 2s ease-in-out infinite;
}

.btn-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: #f59e0b;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
    }
}

.topbar-filters {
    display: flex;
    gap: 8px;
}

.mobile-category-toggle {
    display: none;
    padding: 8px 14px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.mobile-category-toggle:hover {
    background: #5a6fd6;
}

.mobile-category-toggle.active {
    background: #764ba2;
}

/* Sticky 컨테이너 (레거시 - 필요시 삭제) */
.sticky-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 0 15px;
}

/* 상단 헤더 - 컴팩트 */
.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 6px;
    background: #f8f9fa;
}

.tools-header-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.tools-header-left h1 {
    font-size: 1.25rem;
    margin: 0;
}

.tools-count {
    color: #888;
    font-size: 0.8rem;
}

.tools-header-right {
    display: flex;
    gap: 6px;
}

.mini-menu-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    color: #555;
    transition: all 0.15s;
    white-space: nowrap;
}

.mini-menu-item:hover {
    background: #667eea;
    color: #fff;
    text-decoration: none;
}

/* 필터 바 - 컴팩트 */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* 카테고리 탭 */
.category-tabs-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-tabs {
    display: flex;
    flex-shrink: 0;
    background: #e9ecef;
    border-radius: 6px;
    padding: 2px;
}

.category-tab {
    padding: 5px 12px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}

.category-tab:hover {
    color: #333;
}

.category-tab.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.category-tab.ai.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.category-pills-wrap {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
}

.category-pills-wrap.hidden {
    display: none;
}

.category-pills-wrap .pill {
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #555;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.category-pills-wrap .pill:hover {
    background: #f0f0f0;
    border-color: #ccc;
    text-decoration: none;
}

.category-pills-wrap .pill.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

/* AI 카테고리 스타일 */
.ai-pills .pill.ai-pill {
    background: #f8f4ff;
    border-color: #e0d4f7;
}

.ai-pills .pill.ai-pill:hover {
    background: #efe8ff;
    border-color: #c9b8eb;
}

.ai-pills .pill.ai-pill.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.sort-tabs {
    display: flex;
    gap: 5px;
}

.sort-tab {
    padding: 8px 16px;
    background: transparent;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
}

.sort-tab:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.sort-tab.active {
    background: #333;
    color: #fff;
}

/* Tool 리스트 섹션 */
.tool-list-section {
    padding: 0;
}

/* 게임 메뉴 (구버전 호환) */
.game-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.game-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.game-menu-item:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    text-decoration: none;
}

.game-menu-item .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.game-menu-item .label {
    font-weight: 600;
    font-size: 0.95rem;
}

/* 카테고리 pills */
.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 15px;
    background: #fff;
    border-radius: 16px;
}

.category-pills .pill {
    padding: 10px 18px;
    background: #f0f0f0;
    border-radius: 25px;
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.category-pills .pill:hover,
.category-pills .pill.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
}

.category-pills .hidden-pill-collapsed {
    display: none;
}

.category-pills .more-pill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-pills .more-pill:hover {
    opacity: 0.9;
}

/* 뷰 전환 탭 */
.view-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.view-tab {
    padding: 12px 24px;
    background: #fff;
    border-radius: 30px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid #eee;
}

.view-tab:hover {
    border-color: #667eea;
    color: #667eea;
    text-decoration: none;
}

.view-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.view-tab.active:hover {
    color: #fff;
}

/* 핫한 Tool 섹션 */
.hot-tools h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Tool 카드 그리드 */
.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* 게임 스타일 Tool 카드 */
.tool-card-game {
    display: block;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #eee;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tool-card-game:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
    text-decoration: none;
    color: inherit;
}

.tool-card-game .card-rank {
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.tool-card-game .card-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.tool-card-game .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.tool-card-game .card-emoji {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.tool-card-game .card-content {
    text-align: center;
}

.tool-card-game h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.tool-card-game .tagline {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.tool-card-game .card-meta {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tool-card-game .price-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-card-game .price-tag.free { background: #d4edda; color: #155724; }
.tool-card-game .price-tag.paid { background: #f8d7da; color: #721c24; }
.tool-card-game .price-tag.freemium { background: #fff3cd; color: #856404; }

/* 난이도 뱃지 */
.difficulty-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.difficulty-badge.beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty-badge.intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-badge.advanced {
    background: #f8d7da;
    color: #721c24;
}

.tool-card-game .difficulty {
    font-size: 0.85rem;
    color: #888;
}

.tool-card-game .card-stats {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 15px;
}

.tool-card-game .card-stats span {
    margin: 0 8px;
}

.tool-card-game .card-link {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.tool-card-game .card-link:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* 버튼 - 게임 스타일 */
.btn-game {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    background: #f0f0f0;
    color: #333;
}

.btn-game:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-game.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-game.primary:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-game.heart {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.btn-game.like {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-game.dislike {
    background: #e0e0e0;
    color: #666;
}

.btn-game.dislike:hover {
    background: #d0d0d0;
}

.btn-game.voted {
    opacity: 0.7;
    cursor: default;
}

.btn-game.voted:hover {
    transform: none;
}

/* 평가 비율 표시 */
.rating-display {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.rating-display.rating-very-positive {
    background: #d4edda;
    color: #155724;
}

.rating-display.rating-positive {
    background: #cce5ff;
    color: #004085;
}

.rating-display.rating-mixed {
    background: #fff3cd;
    color: #856404;
}

.rating-display.rating-negative {
    background: #f8d7da;
    color: #721c24;
}

.rating-display.rating-none {
    background: #e9ecef;
    color: #6c757d;
}

.btn-game.large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

.btn-game.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* =====================
   랜덤 Tool 페이지
   ===================== */
.random-page {
    text-align: center;
}

.random-hero {
    margin-bottom: 40px;
}

.random-hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.slot-machine {
    max-width: 300px;
    margin: 0 auto;
}

.slot-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 60px;
    margin-bottom: 30px;
}

.slot-icon {
    font-size: 5rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.spin-button {
    display: inline-block;
    padding: 20px 60px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border-radius: 40px;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.spin-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.4);
    text-decoration: none;
}

/* 랜덤 결과 */
.random-result {
    max-width: 400px;
    margin: 0 auto;
}

.result-card {
    background: #fff;
    border-radius: 25px;
    padding: 40px 30px;
    position: relative;
}

.result-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 8px 25px;
    border-radius: 20px;
    font-weight: bold;
}

.result-emoji {
    font-size: 4rem;
    margin: 20px 0;
}

.result-image {
    margin: 20px 0;
}

.result-image img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.result-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.result-tagline {
    color: #666;
    margin-bottom: 20px;
}

.result-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.result-stats {
    color: #999;
    margin-bottom: 20px;
}

.result-stats span {
    margin: 0 10px;
}

.result-target {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.result-target strong {
    display: block;
    margin-bottom: 5px;
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================
   퀴즈 페이지
   ===================== */
.quiz-page {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.quiz-start {
    padding: 60px 20px;
}

.quiz-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.quiz-start h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.quiz-start p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 퀴즈 진행 */
.quiz-question {
    padding: 40px 20px;
}

.quiz-progress {
    margin-bottom: 40px;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.quiz-question h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    border: 2px solid #eee;
}

.quiz-option:hover {
    border-color: #667eea;
    transform: translateX(5px);
    text-decoration: none;
}

.quiz-option .option-icon {
    font-size: 2rem;
}

.quiz-option .option-label {
    font-weight: 500;
}

/* 퀴즈 결과 */
.quiz-result {
    padding: 40px 20px;
}

.result-header {
    margin-bottom: 30px;
}

.result-header .result-icon {
    font-size: 4rem;
}

.result-header h1 {
    margin-top: 10px;
}

.recommended-tools {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.recommended-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    text-align: left;
    position: relative;
}

.recommended-card .rec-rank {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.recommended-card .rec-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.recommended-card h3 {
    margin-bottom: 8px;
}

.recommended-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.recommended-card .rec-target {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

/* =====================
   상세 페이지
   ===================== */
.detail-page {
    max-width: 600px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.detail-emoji {
    font-size: 4rem;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 20px;
    border-radius: 20px;
}

.detail-image {
    flex-shrink: 0;
}

.detail-image img {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.detail-title {
    flex: 1;
}

.detail-category {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 8px;
}

.detail-title h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.detail-tagline {
    color: #666;
    line-height: 1.5;
}

.detail-stats-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.detail-stats-card .stat-item {
    text-align: center;
}

.detail-stats-card .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
}

.detail-stats-card .stat-value {
    font-weight: 500;
}

.detail-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
}

.detail-section {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.detail-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.detail-section.target {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.detail-section.target p {
    color: #333;
    font-weight: 500;
}

.detail-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-section.pros {
    border-left: 4px solid #28a745;
}

.detail-section.cons {
    border-left: 4px solid #dc3545;
}

.similar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.similar-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.similar-item:hover {
    background: #eee;
    text-decoration: none;
}

.similar-item .similar-info {
    flex: 1;
    min-width: 0;
}

.similar-item strong {
    display: block;
    margin-bottom: 3px;
}

.similar-item .similar-tagline {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-item .similar-category {
    flex-shrink: 0;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #888;
    margin-left: 12px;
}

/* 댓글 섹션 (Demo) */
.comments-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-badge {
    font-size: 0.7rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.comments-list.demo-blur {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.comment-avatar {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    font-size: 0.8rem;
    color: #999;
}

.comment-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.comment-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
}

.comment-form input:focus {
    border-color: #667eea;
}

.comment-form button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-form button:hover {
    transform: scale(1.05);
}

.comment-form.demo-disabled input,
.comment-form.demo-disabled button {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-form.demo-disabled button:hover {
    transform: none;
}

/* 뒤로가기 */
.back-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-link a {
    color: #666;
}

/* =====================
   비교(대결) 페이지
   ===================== */
.compare-page {
    max-width: 900px;
    margin: 0 auto;
}

.compare-selector {
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.selector-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.selector-wrap select {
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    min-width: 200px;
    background: #fff;
    cursor: pointer;
}

.selector-wrap select:focus {
    outline: none;
    border-color: #667eea;
}

.vs-badge {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f5576c;
}

.compare-hint {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.2rem;
}

.compare-battle {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.battle-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.battle-emoji {
    font-size: 4rem;
    margin-bottom: 15px;
}

.battle-image {
    margin-bottom: 15px;
}

.battle-image img {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.battle-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.battle-tagline {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.battle-stats {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.battle-stats .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.battle-stats .stat-row:last-child {
    border-bottom: none;
}

.battle-stats .stat-label {
    color: #999;
    font-size: 0.9rem;
}

.battle-stats .stat-value {
    font-weight: 500;
}

.battle-section {
    text-align: left;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.battle-section h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.battle-section p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.battle-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
}

.battle-vs span {
    font-size: 2rem;
    font-weight: bold;
    color: #f5576c;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 반응형 */
@media (max-width: 768px) {
    .tools-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tools-header-left h1 {
        font-size: 1.3rem;
    }

    .filter-bar {
        gap: 10px;
    }

    .sort-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .sort-tab {
        flex: 1;
        text-align: center;
        padding: 10px 8px;
    }

    .tool-cards {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-pros-cons {
        grid-template-columns: 1fr;
    }

    .detail-stats-card {
        grid-template-columns: 1fr 1fr;
    }

    .compare-battle {
        grid-template-columns: 1fr;
    }

    .battle-vs {
        padding: 20px 0;
    }
}

/* =====================
   더보기 / 무한 스크롤
   ===================== */
.load-more-container {
    text-align: center;
    padding: 30px 20px;
    margin-top: 20px;
}

.btn-load-more {
    display: inline-block;
    padding: 16px 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-load-more:active {
    transform: translateY(-1px);
}

.btn-load-more .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-load-more .btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.load-more-info {
    margin-top: 15px;
    color: #999;
    font-size: 0.9rem;
}

.load-more-done {
    color: #666;
    font-size: 1rem;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    display: inline-block;
}

/* =====================
   필터 옵션 (가격/난이도) - 컴팩트
   ===================== */
.filter-options {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.15s;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* =====================
   가로형 Tool 리스트
   ===================== */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    border: 1px solid #eee;
}

.tool-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.12);
    transform: translateX(3px);
    text-decoration: none;
    color: inherit;
}

/* 순위 */
.tool-item .rank {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
}

.tool-item .rank.top-1 {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
}

.tool-item .rank.top-2 {
    background: linear-gradient(135deg, #bdc3c7 0%, #7f8c8d 100%);
    width: 32px;
    height: 32px;
}

.tool-item .rank.top-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    width: 32px;
    height: 32px;
}

/* 이미지 */
.tool-item .tool-image {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
}

.tool-item .tool-image img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
}

/* 정보 영역 */
.tool-item .tool-info {
    flex: 1;
    min-width: 0;
}

.tool-item .tool-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-item .tool-desc {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* 메타 정보 (가격, 난이도) */
.tool-item .tool-meta {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.tool-item .meta-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.tool-item .meta-badge.free {
    background: #d4edda;
    color: #155724;
}

.tool-item .meta-badge.paid {
    background: #f8d7da;
    color: #721c24;
}

.tool-item .meta-badge.freemium {
    background: #fff3cd;
    color: #856404;
}

.tool-item .meta-badge.beginner {
    background: #d4edda;
    color: #155724;
}

.tool-item .meta-badge.intermediate {
    background: #fff3cd;
    color: #856404;
}

.tool-item .meta-badge.advanced {
    background: #f8d7da;
    color: #721c24;
}

.tool-item .meta-badge.category {
    background: #e8e8e8;
    color: #555;
}

/* 통계 영역 */
.tool-item .tool-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-items: center;
}

.tool-item .tool-stats .stat {
    font-size: 0.85rem;
    color: #888;
    white-space: nowrap;
}

.tool-item .tool-stats .rating-display {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
}

/* =====================
   반응형 - 2열 레이아웃
   ===================== */

/* 태블릿 (768px ~ 1024px) */
@media (max-width: 1024px) {
    .tools-layout {
        grid-template-columns: 200px 1fr;
        gap: 15px;
    }

    .tools-sidebar {
        padding: 12px;
    }

    .sidebar-header h2 {
        font-size: 1rem;
    }

    .sidebar-item {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
    .tools-layout {
        grid-template-columns: 1fr;
    }

    /* 사이드바 숨김 (오버레이 방식) */
    .tools-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 260px;
        height: 100vh;
        z-index: 1000;
        border-radius: 0;
        padding: 20px 16px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .tools-sidebar.mobile-open {
        left: 0;
        box-shadow: 0 0 30px rgba(0,0,0,0.3);
    }

    /* 모바일 토글 버튼 표시 */
    .mobile-category-toggle {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* 상단바 조정 */
    .tools-topbar {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px;
    }

    .topbar-title {
        order: 1;
        flex: 1;
    }

    .mobile-category-toggle {
        order: 2;
    }

    .topbar-actions {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .topbar-filters {
        order: 4;
        width: 100%;
        flex-wrap: wrap;
    }

    .topbar-filters .filter-select {
        flex: 1;
        min-width: 80px;
    }

    /* 오버레이 배경 */
    .tools-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: -1;
    }

    .tools-sidebar.mobile-open::before {
        opacity: 1;
        visibility: visible;
        left: 260px;
    }

    .sticky-container {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .tool-item {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 12px;
    }

    .tool-item .rank {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .tool-item .rank.top-1,
    .tool-item .rank.top-2,
    .tool-item .rank.top-3 {
        width: 34px;
        height: 34px;
    }

    .tool-item .tool-image {
        width: 48px;
        height: 48px;
    }

    .tool-item .tool-info {
        flex: 1;
        min-width: calc(100% - 110px);
    }

    .tool-item .tool-name {
        font-size: 0.95rem;
    }

    .tool-item .tool-meta {
        width: 100%;
        order: 4;
        padding-left: 44px;
    }

    .tool-item .tool-stats {
        width: 100%;
        order: 5;
        padding-left: 44px;
        justify-content: flex-start;
    }

    .filter-options {
        width: 100%;
    }

    .sort-tabs {
        width: 100%;
    }

    .sort-tab {
        flex: 1;
        text-align: center;
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

/* =====================
   액션 버튼 (공식 사이트, YouTube)
   ===================== */
.detail-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-action.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.btn-action.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-action.youtube {
    background: #fff;
    border: 2px solid #ff0000;
    color: #ff0000;
}

.btn-action.youtube:hover {
    background: #ff0000;
    color: #fff;
}

/* YouTube 드롭다운 */
.youtube-dropdown {
    position: relative;
}

.youtube-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 100;
}

.youtube-menu.show {
    display: block;
}

.youtube-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s;
}

.youtube-menu a:hover {
    background: #ff0000;
    color: #fff;
}

.yt-arrow {
    font-size: 11px;
    margin-left: 4px;
}

/* 평가 블라인드 */
.rating-hidden {
    color: #999 !important;
    background: #f5f5f5 !important;
}

/* =====================
   평가하기 섹션
   ===================== */
.rating-section {
    text-align: center;
    padding: 25px 20px !important;
}

.rating-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

.rating-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-rate {
    width: 60px;
    height: 60px;
    font-size: 28px;
    border: 2px solid #eee;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-rate.like:hover {
    border-color: #22c55e;
    background: #f0fdf4;
    transform: scale(1.1);
}

.btn-rate.dislike:hover {
    border-color: #ef4444;
    background: #fef2f2;
    transform: scale(1.1);
}

.rating-done {
    padding: 10px 0;
}

.voted-badge {
    display: inline-block;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 20px;
}

.voted-badge.like {
    background: #f0fdf4;
    color: #16a34a;
}

.voted-badge.dislike {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 600px) {
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-action {
        justify-content: center;
    }

    .youtube-menu {
        left: 0;
        right: 0;
    }

    .btn-rate {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
