/**
 * ?????? - ????
 * ????????
 */


/* =============================================
   CSS????
   ============================================= */

:root {
    /* ??? - ?? */
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #E3F2FD;
    /* ??? */
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    /* ??? */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --border-color: #e2e8f0;
    --bg-color: #f7fafc;
    --bg-white: #FFFFFF;
    /* ?? */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* ?? */
    --header-height: 60px;
    --border-radius: 12px;
    --spacing: 16px;
    --max-width: 1280px;
}


/* =============================================
   ????
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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


/* =============================================
   ????
   ============================================= */

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-title {
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 30%, #FF1493 70%, #9370DB 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
    animation: shimmer 3s ease-in-out infinite;
    position: relative;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


/* =============================================
   Home toolbar
   ============================================= */

.home-toolbar {
    max-width: var(--max-width);
    margin: 0 auto 16px;
    padding: 14px var(--spacing);
    background: var(--bg-white);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

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

.switch-category-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.switch-category-btn:hover {
    color: var(--primary-dark);
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.toolbar-category {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.home-toolbar .category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0;
    background: none;
    border: none;
    overflow: visible;
    max-width: none;
}

.home-toolbar .category-item {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: #f5f5f4;
    color: #78716c;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    transform: none;
}

.home-toolbar .category-item:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
    transform: none;
}

.home-toolbar .category-item.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    border-color: var(--primary-color);
    box-shadow: none;
}

.home-toolbar .category-item.active::after {
    display: none;
}

.toolbar-search {
    display: flex;
    align-items: stretch;
    background: #f5f5f4;
    border-radius: 10px;
    border: 1px solid #e7e5e4;
    overflow: hidden;
}

.home-toolbar .search-form {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.home-toolbar .search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.home-toolbar .search-btn {
    padding: 0 14px;
    color: #a8a29e;
    display: flex;
    align-items: center;
    background: transparent;
    transition: color 0.2s ease;
}

.home-toolbar .search-btn:hover {
    color: var(--primary-color);
}

.home-toolbar .keyword-filter-wrapper {
    position: relative;
    border-left: 1px solid #e7e5e4;
}

.home-toolbar .keyword-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 100%;
    min-height: 40px;
    padding: 0;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.home-toolbar .keyword-toggle:hover,
.home-toolbar .keyword-toggle.active {
    background: var(--primary-dark);
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.category-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.category-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: none;
}

/* =============================================
   ???
   ============================================= */

.search-bar {
    background: var(--bg-white);
    padding: 12px var(--spacing);
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 10px 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--primary-color);
}


/* =============================================
   ??? - ??????
   ============================================= */

.announcement-bar {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    padding: 16px var(--spacing);
    border-bottom: 1px solid #FFDAA5;
}

.announcement-content-full {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: left;
}

.announcement-text {
    font-size: 16px;
    line-height: 1.8;
    color: #D97706;
    font-weight: 500;
    display: block;
    word-wrap: break-word;
    margin-bottom: 10px;
    text-align: left;
}

.announcement-text:last-child {
    margin-bottom: 0;
}

.announcement-text a {
    color: #D97706;
    text-decoration: none;
    transition: color 0.3s ease;
}

.announcement-text a:hover {
    color: #B45309;
}


/* =============================================
   ????
   ============================================= */

.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px var(--spacing);
    min-height: calc(100vh - 200px);
}


/* ??????? */

body:has(.detail-container) .main-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
}


/* =============================================
   ?????????
   ============================================= */

.search-and-filter {
    background: var(--bg-white);
    padding: 8px var(--spacing);
    border-bottom: 1px solid var(--border-color);
}

.search-and-filter .search-bar {
    display: flex;
    align-items: stretch;
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 24px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 0;
    border: none;
}

.search-and-filter .search-form {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.search-and-filter .search-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.search-and-filter .search-btn {
    padding: 10px 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.search-and-filter .search-btn:hover {
    color: var(--primary-color);
}

.keyword-filter-wrapper {
    position: relative;
    margin-left: 0;
}

.keyword-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 100%;
    padding: 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.keyword-toggle:hover,
.keyword-toggle.active {
    background: var(--primary-dark);
}

.keyword-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    max-width: 500px;
    background: var(--bg-white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.keyword-filter-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.keyword-filter-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.clear-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--danger-color);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.clear-filter:hover {
    background: #D32F2F;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.keyword-list::-webkit-scrollbar {
    width: 6px;
}

.keyword-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

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

.keyword-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.keyword-item:hover {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.keyword-item.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.3);
}


/* =============================================
   ????
   ============================================= */

.gallery-container {
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.gallery-item {
    background: var(--bg-white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.gallery-link {
    display: block;
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 133%;
    /* 3:4 ?? - ???????? */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.08);
    filter: brightness(1.05);
}

.badge-hot {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    padding: 8px 18px 8px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(236, 72, 153, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: hotGlow 2s ease-in-out infinite;
}

.badge-hot::before {
    content: "\1F525";
    font-size: 13px;
    animation: hotSpark 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

.gallery-item:hover .badge-hot {
    background: linear-gradient(135deg, #A855F7 0%, #F472B6 100%);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.8), 0 0 40px rgba(244, 114, 182, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}


/* ???? - ???? */

.badge-limited {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    margin-right: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
    animation: badgeGlow 2s ease-in-out infinite;
}


/* ???? - ???? */

.badge-ace {
    display: inline-block;
    background: linear-gradient(135deg, #9C27B0 0%, #673AB7 100%);
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    margin-right: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
    animation: badgeGlow 2s ease-in-out infinite 0.5s;
}

@keyframes badgeGlow {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(156, 39, 176, 0.4);
    }

    50% {
        box-shadow: 0 4px 16px rgba(156, 39, 176, 0.6);
    }
}


/* ???????? */

.detail-title .badge-limited,
.detail-title .badge-ace {
    font-size: 13px;
    padding: 6px 14px;
    line-height: 1;
}

@keyframes hotSpark {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(-5deg);
        opacity: 0.8;
    }
}

@keyframes hotGlow {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6), 0 0 30px rgba(236, 72, 153, 0.4);
    }

    50% {
        box-shadow: 0 4px 24px rgba(139, 92, 246, 0.8), 0 0 40px rgba(236, 72, 153, 0.6);
    }
}

.gallery-info {
    padding: 14px 16px;
}

.gallery-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.2px;
    line-height: 1.5;
}

.gallery-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: linear-gradient(135deg, #06B6D4 0%, #3B82F6 100%);
    color: white;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.view-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}


/* =============================================
   ???
   ============================================= */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}


/* =============================================
   ??
   ============================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.page-btn,
.page-num {
    padding: 10px 18px;
    background: var(--bg-white);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.page-btn:hover,
.page-num:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.page-num.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.page-dots {
    padding: 8px;
    color: var(--text-muted);
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =============================================
   ???
   ============================================= */

.detail-container {
    background: var(--bg-white);
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    max-width: 100%;
    margin: 0;
}

.detail-main-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    object-fit: cover;
}

.detail-info {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px var(--spacing);
}


/* ??????? */

.detail-top-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.top-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.top-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.top-nav-btn svg {
    flex-shrink: 0;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #F59E0B;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.meta-item svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.category-name {
    font-weight: 600;
    color: var(--text-primary);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags .tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.detail-tags .tag-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.detail-time,
.detail-views {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}


/* ???????? */

.detail-keywords-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-keywords-box .keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.detail-keywords-box .keyword-tag:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}


/* ?????????????? */

.detail-keywords {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 32px;
}

.detail-keywords svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--text-muted);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-color);
    color: var(--text-secondary);
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.keyword-tag:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-color);
}

.detail-description {
    margin-bottom: 32px;
}

.detail-description p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
}

.detail-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    margin: 0 0 12px 0 !important;
    border-radius: 0;
    display: block;
}

.detail-content video,
.detail-content iframe.ql-video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto;
    margin: 12px 0 !important;
    border-radius: 0;
    display: block;
    background: #000;
}

.detail-content p {
    margin: 0 0 8px 0;
}

/* 空段落不占位 */
.detail-content > p:not(:has(img)):not(:has(video)):not(:has(iframe)):has(> br:only-child),
.detail-content > p:empty {
    display: none;
}

.detail-content > p:not(:has(img)):not(:has(video)):not(:has(iframe)) {
    margin: 8px 0;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
    margin: 32px 0 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.detail-content h1 {
    font-size: 28px;
}

.detail-content h2 {
    font-size: 24px;
}

.detail-content h3 {
    font-size: 20px;
}

.detail-content ul,
.detail-content ol {
    margin: 16px 0;
    padding-left: 28px;
}

.detail-content li {
    margin: 8px 0;
}

.detail-content blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-color);
    color: var(--text-secondary);
    font-style: italic;
}

.detail-nav {
    padding: 32px var(--spacing);
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 2px solid var(--border-color);
    background: var(--bg-white);
}

.nav-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.nav-btn svg {
    flex-shrink: 0;
}

.nav-btn.nav-back {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.nav-btn.nav-back:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.nav-btn.nav-home {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.nav-btn.nav-home:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.nav-btn.nav-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn.nav-disabled:hover {
    transform: none;
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/* =============================================
   ??
   ============================================= */

.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px var(--spacing);
    margin-top: 40px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}


/* =============================================
   ??????
   ============================================= */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1565C0 100%);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.5);
}


/* =============================================
   ?????
   ============================================= */

@media (max-width: 768px) {
    :root {
        --spacing: 12px;
        --header-height: 56px;
    }

    .home-toolbar {
        margin-bottom: 12px;
        padding: 12px;
        border-radius: 12px;
    }

    .toolbar-category {
        font-size: 16px;
    }

    .home-toolbar .category-item {
        padding: 6px 14px;
        font-size: 12px;
    }

    .category-nav {
        padding: 12px var(--spacing);
        gap: 8px;
    }

    .category-item {
        padding: 6px 16px;
        font-size: 13px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .gallery-image {
        padding-top: 140%;
        /* ????????? */
    }

    .gallery-info {
        padding: 10px 12px;
    }

    .gallery-title {
        font-size: 14px;
        margin-bottom: 0;
        line-height: 1.4;
    }

    .gallery-desc {
        font-size: 12px;
    }

    .badge-hot {
        top: 0;
        right: 0;
        padding: 6px 14px 6px 10px;
        font-size: 10px;
        gap: 4px;
        letter-spacing: 0.5px;
    }

    .badge-hot::before {
        font-size: 11px;
    }

    .category-tag {
        font-size: 10px;
        padding: 4px 10px;
    }

    .search-and-filter {
        padding: 10px var(--spacing);
    }

    .search-and-filter .search-form {
        border-radius: 20px;
    }

    .keyword-toggle {
        width: 40px;
        height: 40px;
        border-radius: 0 20px 20px 0;
    }

    .keyword-toggle svg {
        width: 18px;
        height: 18px;
    }

    .keyword-filter-wrapper {
        margin-left: -1px;
    }

    .keyword-filter-dropdown {
        min-width: calc(100vw - 32px);
        left: auto;
        right: 0;
        transform: translateY(-10px);
    }

    .keyword-filter-dropdown.active {
        transform: translateY(0);
    }

    .keyword-list {
        gap: 6px;
        max-height: 200px;
    }

    .keyword-item {
        padding: 5px 12px;
        font-size: 12px;
    }

    .clear-filter {
        font-size: 11px;
        padding: 4px 10px;
    }

    .detail-info {
        padding: 24px var(--spacing);
    }

    .detail-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .detail-meta {
        gap: 12px;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .detail-keywords {
        padding: 16px 0;
        margin-bottom: 24px;
    }

    .detail-keywords-box {
        padding: 16px 0;
        margin-bottom: 20px;
        gap: 8px;
    }

    .detail-keywords-box .keyword-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .keyword-tag {
        font-size: 12px;
        padding: 5px 12px;
    }

    .detail-content {
        font-size: 15px;
    }

    .detail-content img {
        width: 100% !important;
        max-width: 100% !important;
    }

    .detail-content video,
    .detail-content iframe.ql-video {
        margin: 10px 0 !important;
    }

    .detail-top-nav {
        gap: 8px;
        margin-bottom: 16px;
    }

    .top-nav-btn {
        padding: 6px 12px;
        font-size: 13px;
        gap: 4px;
    }

    .top-nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .detail-nav {
        padding: 20px var(--spacing);
    }

    .nav-row {
        gap: 8px;
    }

    .nav-btn {
        padding: 10px 14px;
        font-size: 13px;
        gap: 6px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* =============================================
   ????
   ============================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-item {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:nth-child(1) {
    animation-delay: 0s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.05s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.15s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.25s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.35s;
}


/* ???? */

.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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


/* ?????????? */

body {
    animation: pageLoad 0.5s ease;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* =============================================
   Category select entry page
   ============================================= */

.category-select-page {
    min-height: 100vh;
    background-color: #2D2D2D;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
    animation: none;
}

.select-header {
    text-align: center;
    padding: 28px 16px 12px;
    position: relative;
}

.select-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    padding: 8px 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 20px;
    text-decoration: none;
    backdrop-filter: blur(6px);
}

.select-back-link:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.select-empty-hint {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.75;
}

.select-empty-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    text-decoration: none;
}

.select-brand {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.select-hint {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.select-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 12px 40px;
}

.select-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.category-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.category-tile {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: block;
    border-radius: 12px;
}

.category-tile-bg {
    width: 100%;
    height: 100%;
    background-color: #fff;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

@media (max-width: 380px) {
    .category-select-grid {
        gap: 8px;
    }
}

@media (min-width: 768px) {
    .select-brand {
        font-size: 32px;
    }

    .category-select-grid {
        gap: 14px;
    }
}



