/* ===== CSS 变量定义 ===== */
:root {
    /* 浅色模式配色 */
    --bg-primary: #FBFBFB;
    --bg-secondary: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-card2: #ffffff;
    --bg-card3: #f0f2f4;
    --bg-hover: #F8FAFC;
    --bg-pagination: #ffffff;
    
    --text-primary: #333333;
    --text-title: #333333;
    --text-subtitle: #999999;
    --text-subtitle-alt: #333333;
    --text-secondary: #808080;
    --text-tertiary: #B3B3B3;
    --text-inverse: #FFFFFF;
    --text-tertiary-alt: #666666;
    
    --border-primary: #E2E8F0;
    --border-secondary: #CBD5E1;
    --border-pagination: #E5E7EB;
    
    --primary-color: #0DC46C;
    --primary-color-alt: #0CAF60;
    --primary-color-hover: #0FDE7A;
    --primary-color-light: #E6FFEF;
    --primary-color-active: #0E8C0E;
    
    --shadow-sm: 0 1px 4px rgba(12, 12, 13, 0.05);
    --shadow-md: 0 0 10px -1px rgba(12, 12, 13, 0.20);
    --shadow-lg: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
    
    /* Modal 弹窗相关 */
    --bg-modal: #FFFFFF;
    --bg-close-btn: #FFFFFF;
    --bg-close-btn-hover: #F1F5F9;
    --text-modal-title: #333333;
    --text-modal-label: #333333;
    --border-modal-divider: #E2E8F0;
    --bg-input: #F6F8FA;
    --border-input: #E2E8F0;
    --text-placeholder: #B0B6BF;
    --text-subdomain-prefix: #0E8C0E;
    --text-modal-terms: rgba(51, 51, 51, 0.3);
    --bg-modal-close-hover: rgba(0, 0, 0, 0.05);
    --color-scrollbar-track: #F0F2F4;
    --color-scrollbar-thumb: #CBD5E1;
    --color-scrollbar-thumb-hover: #94A3B8;
    --shadow-button-primary: 0px 8px 10px 0px rgba(13, 196, 108, 0.25);
    
    /* Buy Modal 特定变量 */
    --border-close-btn: #E2E8F0;
    --border-store-logo: rgba(0, 0, 0, 0.1);
    --bg-button-secondary: #FFFFFF;
    --text-store-name: #000000;
    --stroke-close-icon: #000000;
    
    /* QC Modal 特定变量 */
    --bg-gallery: #FFFFFF;
    --border-gallery: #E2E8F0;
    --border-nav-btn: rgba(51, 51, 51, 0.1);
    --bg-nav-btn: #FFFFFF;
    --bg-nav-btn-hover: #F0F2F4;
    --stroke-nav-icon: #333333;
    --border-thumbnail: transparent;
    --border-thumbnail-hover: #64748B;
    --border-thumbnail-active: #333333;
    
    /* Auth Modal 特定变量 */
    --auth-modal-subtitle: #4D4D4D;
    --auth-modal-text: #333333;
    --auth-modal-label: #4D4D4D;
    --auth-modal-input-bg: #FFFFFF;
    --auth-modal-input-border: #E2E8F0;
    --auth-modal-input-text: #333333;
    --auth-modal-input-placeholder: #C0C0C0;
    --auth-modal-input-disabled-bg: #F6F8FA;
    --auth-modal-button-text: #333333;
    --auth-modal-button-border: #E6E6E6;
    --auth-modal-button-hover: #F6F8FA;
    --auth-modal-divider: #E2E8F0;
    --auth-modal-switch-bg: #F8FAFC;
    --auth-modal-switch-text: #64748B;
    --auth-modal-checkbox-border: #E2E8F0;
    --auth-modal-checkbox-bg: #FFFFFF;
    --auth-modal-cancel-text: #64748B;
    --auth-modal-cancel-hover: #475569;
    --auth-modal-shadow: 0 120px 120px 0 rgba(128, 128, 128, 0.1);
    --auth-modal-input-icon: #808080;
}

/* 暗黑模式配色 */
[data-theme="dark"] {
    --bg-primary: #21323B;
    --bg-secondary: #202934;
    --bg-card: #272E33;
    --bg-card2: #4A5F4B;
    --bg-card3: #4A5F4B;
    --bg-hover: #35383F;
    --bg-pagination: #3A404F;
    
    --text-primary: #F5F5F5;
    --text-title: #FFECA1;
    --text-subtitle: #A2B6BF;
    --text-subtitle-alt: #A2B6BF;
    --text-secondary: #D7E2EF;
    
    --text-tertiary: #808080;
    --text-inverse: #1F222A;
    --text-tertiary-alt: #ffffff;

    --border-primary: #484E57;
    --border-secondary: #4A4D57;
    --border-pagination: #445469;
    
    --primary-color-light: #E6FFEF;
    
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 0 10px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0px 0px 6px 0px rgba(0, 0, 0, 0.4);
    
    /* Modal 弹窗相关 - 深色模式 */
    --bg-modal: #2C303B;
    --bg-close-btn: #2C303B;
    --bg-close-btn-hover: #3A404F;
    --text-modal-title: #ffeca1;
    --text-modal-label: #A2B6BF;
    --border-modal-divider: #242C37;
    --bg-input: #3A404F;
    --border-input: #445469;
    --text-subdomain-prefix: #FFFFFF;
    --text-modal-terms: #9CA3AF;
    --bg-modal-close-hover: rgba(255, 255, 255, 0.1);
    --color-scrollbar-track: #242C37;
    --color-scrollbar-thumb: #445469;
    --color-scrollbar-thumb-hover: #525F7A;
    --shadow-button-primary: 0px 8px 10px 0px rgba(33, 189, 98, 0.25);
    
    /* Buy Modal 特定变量 - 深色模式 */
    --border-close-btn: rgba(255, 255, 255, 0.2);
    --border-store-logo: rgba(255, 255, 255, 0.2);
    --bg-button-secondary: #313432;
    --primary-color-hover-green: #24CC6A;
    --text-store-name: #9CA3AF;
    --stroke-close-icon: #9CA3AF;
    
    /* QC Modal 特定变量 - 深色模式 */
    --bg-gallery: #2C303B;
    --border-gallery: #242C37;
    --border-nav-btn: rgba(255, 255, 255, 0.2);
    --bg-nav-btn: #313432;
    --bg-nav-btn-hover: #3A3D3A;
    --stroke-nav-icon: #9CA3AF;
    --border-thumbnail: transparent;
    --border-thumbnail-hover: #64748B;
    --border-thumbnail-active: #9CA3AF;
    
    /* Auth Modal 特定变量 - 深色模式 */
    --auth-modal-subtitle: #9CA3AF;
    --auth-modal-text: #F5F5F5;
    --auth-modal-label: #A2B6BF;
    --auth-modal-input-bg: #3A404F;
    --auth-modal-input-border: #445469;
    --auth-modal-input-text: #F5F5F5;
    --auth-modal-input-placeholder: #64748B;
    --auth-modal-input-disabled-bg: #292D38;
    --auth-modal-button-text: #F5F5F5;
    --auth-modal-button-border: #445469;
    --auth-modal-button-hover: #35383F;
    --auth-modal-divider: #445469;
    --auth-modal-switch-bg: #3A404F;
    --auth-modal-switch-text: #9CA3AF;
    --auth-modal-checkbox-border: #445469;
    --auth-modal-checkbox-bg: #3A404F;
    --auth-modal-cancel-text: #9CA3AF;
    --auth-modal-cancel-hover: #A2B6BF;
    --auth-modal-shadow: 0 120px 120px 0 rgba(0, 0, 0, 0.5);
    --auth-modal-input-icon: #9CA3AF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-content {
    margin: 16px 16px 16px 100px;
    padding: 32px;
    border-radius: 20px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    z-index: 11;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 搜索输入框 */
.search-input-container {
    position: relative;
    width: 650px;
    height: 58px;
}

.search-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 81px;
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 0;
}

.search-input-container.active::before {
    border-color: var(--primary-color);
    border-radius: 24px;
    /* box-shadow: 0px 8px 24px 0px var(--primary-color-light); */
    bottom: -100%;
}

.search-input-container.top.active::before {
    top: -100%;
    bottom: 0;
}

.search-input-field {
    position: relative;
    width: 100%;
    height: 58px;
    border-radius: 81px;
    border: none;
    background: transparent;
    padding: 10px 70px 10px 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    text-transform: capitalize;
    outline: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.search-input-field::placeholder {
    color: var(--text-tertiary);
}

.search-input-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border-radius: 29px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    /* box-shadow: 0px 2px 8px 0px var(--primary-color-light), 0px 2px 8px 0px var(--primary-color-light); */
    transition: all 0.3s ease;
    z-index: 2;
}

.search-input-button:hover {
    background: var(--primary-color-hover);
}

.search-input-button:active {
    background-color: var(--primary-color-active);
    transform: scale(0.95) translateY(-50%);
}

.search-dropdown-panel {
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 8px 8px 8px 8px;
    border-radius: 0 0 24px 24px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    border: 2px solid var(--primary-color);
    border-top: none;
}

.search-input-container.top .search-dropdown-panel {
    top: auto;
    bottom: 58px;
    border-radius: 24px 24px 0 0;
    border-top: 2px solid var(--primary-color);
    border-bottom: none;
}

.search-dropdown-panel.active {
    max-height: 300px;
    opacity: 1;
}

.search-dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #FAFAFA;
    padding: 12px;
    border-radius: 12px;
}

.search-dropdown-label {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #808080;
    text-transform: capitalize;
}

.search-dropdown-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-dropdown-item {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-dropdown-item:hover {
    background: #f8fafc;
    color: #0dc46c;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .main-content {
        padding: 16px 24px;
    }

    .search-input-container{
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
        margin-left: 16px;
        z-index: 1;
        margin-bottom: 86px;
    }

    
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-scrollbar-thumb);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-scrollbar-thumb-hover);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color-hover);
}
