/* 工业科技风格 - 首页样式 */

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

:root {
    /* 深色背景 */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-card: #1e2433;
    
    /* 霓虹色 */
    --neon-green: #00ff88;
    --neon-blue: #00d9ff;
    --neon-pink: #ff006e;
    
    /* 文字色 */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    
    /* 强调色 */
    --accent-green: #00ff88;
    --accent-blue: #00d9ff;
    --warning: #ff6b6b;
    --success: #00ff88;
    
    /* 边框和阴影 */
    --border-color: rgba(0, 255, 136, 0.2);
    --glow-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    --glow-shadow-hover: 0 0 30px rgba(0, 255, 136, 0.6);
}

body {
    font-family: 'Poppins', 'SimSun', '宋体', serif;
    font-weight: 700;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景网格 */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 顶部标题栏 */
.header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--glow-shadow);
    position: relative;
    overflow: visible;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text h1 {
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.stat-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 搜索和筛选 */
.search-section {
    margin-bottom: 30px;
}

.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--neon-green);
    pointer-events: none;
}

.search-bar input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: var(--glow-shadow);
}

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

.filter-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-chip:hover {
    border-color: var(--chip-color, var(--neon-green));
    color: var(--chip-color, var(--neon-green));
    transform: translateY(-2px);
}

.filter-chip.active {
    background: var(--chip-color, var(--neon-green));
    border-color: var(--chip-color, var(--neon-green));
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--chip-color, var(--neon-green));
}

/* 设备网格 */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.device-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(0, 255, 136, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.device-card:hover {
    border-color: var(--neon-green);
    box-shadow: var(--glow-shadow-hover);
    transform: translateY(-5px);
}

.device-card:hover::before {
    opacity: 1;
}

.device-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.device-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.device-card:hover .device-image img {
    transform: scale(1.05);
}

.chip-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--chip-color);
    border-radius: 20px;
    color: var(--chip-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px var(--chip-color);
}

.device-info {
    padding: 20px;
}

.device-name {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.device-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 16px;
    line-height: 1.5;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.flash-button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    border: none;
    border-radius: 10px;
    color: var(--bg-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flash-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.5);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5em;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    text-align: center;
}

.footer-content p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin: 5px 0;
}

.footer-content a {
    color: var(--neon-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo-text h1 {
        font-size: 1.5em;
    }
    
    .header-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .device-specs {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .devices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    .devices-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1401px) {
    .devices-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 子分类筛选容器 */
.sub-filter-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-filter-chips {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-filter-chip {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
}

.sub-filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-green);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.sub-filter-chip.active {
    background: var(--neon-green);
    border-color: var(--neon-green);
    color: var(--bg-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sub-filter-container {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .sub-filter-chip {
        padding: 8px 18px;
        font-size: 0.9em;
    }
}

/* 品牌名称样式 */
.footer-brand {
    margin-top: 15px !important;
    font-size: 0.95em !important;
}

.footer-brand .brand-name {
    color: var(--neon-green);
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* 语言切换器 */
.language-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
}

.lang-btn:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.lang-icon {
    width: 20px;
    height: 20px;
    color: var(--neon-green);
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.lang-btn.active .dropdown-icon {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    min-width: 200px;
    display: none;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', 'SimSun', '宋体', serif;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--bg-secondary);
    color: var(--neon-green);
}

.lang-option.active {
    background: var(--bg-secondary);
    color: var(--neon-green);
    font-weight: 700;
}

.lang-code {
    font-size: 0.75em;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .language-switcher {
        width: 100%;
    }
    
    .lang-btn {
        width: 100%;
        justify-content: center;
    }
    
    .lang-dropdown {
        left: 0;
        right: 0;
    }
}
