/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 添加积木风格CSS变量 */
:root {
    --brick-red: #dc143c;
    --brick-blue: #1e6cc8;
    --brick-yellow: #ffd700;
    --brick-green: #228b22;
    --brick-orange: #ff6b35;
    --brick-gray: #8b8b8b;
    --brick-shadow: 0 4px 8px rgba(0,0,0,0.3);
    --brick-border: 2px solid rgba(255,255,255,0.3);
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 积木风格的通用按钮 */
.brick-button {
    position: relative;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--brick-shadow);
    overflow: hidden;
}

.brick-button::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.brick-button::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 20%;
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    box-shadow: 
        20px 0 rgba(255,255,255,0.3),
        40px 0 rgba(255,255,255,0.3);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--brick-orange);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.nav-logo img {
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-menu li {
    margin: 0 20px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--brick-orange);
    background: rgba(255, 107, 53, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(90deg, var(--brick-orange), var(--brick-yellow));
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.nav-auth {
    display: flex;
    gap: 10px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 主横幅样式 - 增强积木感 */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 50%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 20%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 60% 80%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px, 50px 50px, 30px 30px, 30px 30px;
    opacity: 0.6;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.highlight {
    color: var(--brick-yellow);
    display: block;
    animation: glow 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(255, 235, 59, 0.5);
}

@keyframes glow {
    from { 
        text-shadow: 0 0 20px rgba(255, 235, 59, 0.5), 3px 3px 6px rgba(0,0,0,0.3);
    }
    to { 
        text-shadow: 0 0 30px rgba(255, 235, 59, 0.8), 0 0 40px rgba(255, 235, 59, 0.3), 3px 3px 6px rgba(0,0,0,0.3);
    }
}

.hero-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, var(--brick-orange), var(--brick-yellow));
    color: white;
    box-shadow: var(--brick-shadow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 3px solid white;
    box-shadow: inset 0 0 0 0 white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brick-showcase {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    grid-template-rows: repeat(4, 80px);
    gap: 10px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

/* 新的浮动动画 - 每个积木独立浮动 */
@keyframes gentleFloat1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes gentleFloat2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes gentleFloat3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(1.5deg); }
}

@keyframes gentleFloat4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
}

.brick {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    position: relative;
    box-shadow: var(--brick-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 为不同位置的积木添加不同的浮动动画 */
.brick:nth-child(4n+1) {
    animation: gentleFloat1 4s ease-in-out infinite;
}

.brick:nth-child(4n+2) {
    animation: gentleFloat2 5s ease-in-out infinite 0.5s;
}

.brick:nth-child(4n+3) {
    animation: gentleFloat3 4.5s ease-in-out infinite 1s;
}

.brick:nth-child(4n) {
    animation: gentleFloat4 5.5s ease-in-out infinite 1.5s;
}

/* 悬停效果 - 暂停动画并添加缩放 */
.brick:hover {
    animation-play-state: paused;
    transform: scale(1.1) translateY(-5px);
    box-shadow: var(--brick-shadow), 0 15px 30px rgba(0,0,0,0.3);
}

/* 整个积木展示区域悬停时的效果 */
.brick-showcase:hover .brick:not(:hover) {
    opacity: 0.7;
}

/* 积木顶部的圆形凸起效果 */
.brick::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 
        -20px 20px 0 -8px rgba(255,255,255,0.3),
        20px 20px 0 -8px rgba(255,255,255,0.3),
        0 35px 0 -8px rgba(255,255,255,0.3);
}

/* 积木侧面立体效果 */
.brick::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 15px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.2));
    border-radius: 0 0 15px 15px;
}

.brick.red { 
    background: linear-gradient(135deg, var(--brick-red), #b71c1c);
}
.brick.blue { 
    background: linear-gradient(135deg, var(--brick-blue), #0d47a1);
}
.brick.yellow { 
    background: linear-gradient(135deg, var(--brick-yellow), #f57f17);
}
.brick.green { 
    background: linear-gradient(135deg, var(--brick-green), #1b5e20);
}

/* 功能卡片样式 - 积木风格 */
.features {
    padding: 100px 0;
    background: 
        linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%),
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
}

/* 积木拼接效果 */
.feature-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 10%;
    width: 20px;
    height: 20px;
    background: var(--brick-orange);
    border-radius: 50% 50% 0 0;
    box-shadow: 
        40px 0 var(--brick-blue),
        80px 0 var(--brick-yellow),
        120px 0 var(--brick-green);
    transition: all 0.3s ease;
}

.feature-card:hover::before {
    animation: brickDance 2s ease-in-out infinite;
}

/* 积木舞蹈动画 - 只保留波浪起伏效果 */
@keyframes brickDance {
    0%, 100% { 
        transform: translateY(0);
        background: var(--brick-orange);
        box-shadow: 
            40px 0 var(--brick-blue),
            80px 0 var(--brick-yellow),
            120px 0 var(--brick-green);
    }
    
    20% { 
        transform: translateY(-6px);
        background: var(--brick-orange);
        box-shadow: 
            40px 0 var(--brick-blue),
            80px 0 var(--brick-yellow),
            120px 0 var(--brick-green);
    }
    
    40% { 
        transform: translateY(0);
        background: var(--brick-orange);
        box-shadow: 
            40px -6px var(--brick-blue),
            80px 0 var(--brick-yellow),
            120px 0 var(--brick-green);
    }
    
    60% { 
        transform: translateY(0);
        background: var(--brick-orange);
        box-shadow: 
            40px 0 var(--brick-blue),
            80px -6px var(--brick-yellow),
            120px 0 var(--brick-green);
    }
    
    80% { 
        transform: translateY(0);
        background: var(--brick-orange);
        box-shadow: 
            40px 0 var(--brick-blue),
            80px 0 var(--brick-yellow),
            120px -6px var(--brick-green);
    }
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--brick-orange);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
    box-shadow: var(--brick-shadow);
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    box-shadow: 
        -15px 15px 0 -6px rgba(255,255,255,0.3),
        15px 15px 0 -6px rgba(255,255,255,0.3);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-feature {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--brick-shadow);
}

.btn-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 产品展示样式 */
.products {
    padding: 100px 0;
    background: white;
    position: relative;
}

/* 添加积木纹理背景 */
.products::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 107, 53, 0.03) 2px,
            rgba(255, 107, 53, 0.03) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 107, 53, 0.03) 2px,
            rgba(255, 107, 53, 0.03) 4px
        );
    pointer-events: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    position: relative;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 添加积木装饰 */
.section-title::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--brick-orange);
    border-radius: 50%;
    box-shadow: 
        -30px 0 var(--brick-blue),
        30px 0 var(--brick-yellow);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 3px solid transparent;
}

/* 积木卡片装饰 */
.product-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 15px;
    width: 16px;
    height: 16px;
    background: var(--brick-orange);
    border-radius: 50% 50% 0 0;
    z-index: 2;
    box-shadow: 
        25px 0 var(--brick-blue),
        50px 0 var(--brick-yellow),
        75px 0 var(--brick-green);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: var(--brick-orange);
}

.product-card:hover::before {
    animation: bounce 0.6s ease-in-out;
}

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

.product-image {
    height: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 产品图片中的积木纹理 - 只在没有背景图片时显示 */
.product-image:not([style*="background-image"])::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 3px, transparent 3px),
        radial-gradient(circle at 75% 25%, rgba(255,255,255,0.1) 3px, transparent 3px),
        radial-gradient(circle at 25% 75%, rgba(255,255,255,0.1) 3px, transparent 3px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 3px, transparent 3px);
    background-size: 40px 40px;
}

.product-image:not([style*="background-image"])::before {
    content: attr(data-emoji) '🧱';
    opacity: 0.8;
    z-index: 1;
    position: relative;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: var(--brick-shadow);
}

.product-badge::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
}

.product-info {
    padding: 25px;
    background: linear-gradient(180deg, white 0%, #fafafa 100%);
}

.product-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.product-id {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.product-price {
    font-size: 1.5rem;
    color: var(--brick-orange);
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.btn-add-cart {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--brick-shadow);
    overflow: hidden;
}

.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.btn-add-cart:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* 作品展示样式 - 积木风格增强 */
.gallery-preview {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.gallery-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255,107,53,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52,152,219,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.gallery-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

/* 作品展示积木装饰 */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 20px;
    height: 20px;
    background: #ff6b35;
    border-radius: 4px;
    box-shadow: 
        0 0 0 2px white,
        30px 0 0 0 #3498db,
        30px 0 0 2px white,
        60px 0 0 0 #f1c40f,
        60px 0 0 2px white;
    z-index: 2;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.gallery-info p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin: 0 0 10px 0;
}

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

.gallery-tags .tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

.gallery-details {
    padding: 25px;
}

.gallery-details h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.gallery-details p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.gallery-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gallery-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.gallery-stats i {
    color: #ff6b35;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item::before {
        display: none;
    }
    
    .gallery-details {
        padding: 20px;
    }
    
    .gallery-stats {
        gap: 10px;
    }
    
    .gallery-stats span {
        font-size: 0.8rem;
    }
}

/* 移动端专用样式 - 更小屏幕 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo {
        font-size: 20px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-card,
    .product-card,
    .gallery-item {
        margin: 0 5px;
        padding: 20px 15px;
    }
    
    .brick-showcase {
        grid-template-columns: repeat(3, 1fr);
        max-width: 200px;
    }
    
    .brick {
        width: 50px;
        height: 35px;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-box input {
        padding: 12px 45px 12px 15px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 40px;
        height: 40px;
    }
}

/* 关于我们section样式 */
.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="brick-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><rect width="20" height="20" fill="none" stroke="rgba(255,107,53,0.1)" stroke-width="0.5"/><circle cx="10" cy="10" r="2" fill="rgba(255,107,53,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23brick-pattern)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.about-intro {
    margin-bottom: 40px;
}

.about-intro h3 {
    color: #ff6b35;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.about-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-item {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-color: #ff6b35;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b35, #ff8a65);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(255,107,53,0.3);
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-item h4 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-item p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.about-stats {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid #ff6b35;
    position: sticky;
    top: 100px;
}

.stat-item {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b35;
    margin-bottom: 10px;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0.5px;
}

.stat-label {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* 主页论坛预览遮罩样式 */
.gallery-item {
    position: relative;
}

.post-overlay-preview {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 53, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.post-overlay-preview i {
    margin-right: 4px;
    font-size: 0.7rem;
}

/* 模态框和通知的z-index层级 */
.product-modal {
    z-index: 2000 !important;
}

.notification {
    z-index: 9999 !important;
}

/* 确保模态框背景遮罩在最顶层 */
.modal-backdrop {
    z-index: 1999 !important;
}

/* 论坛模态框 */
.modal {
    z-index: 2001 !important;
}

.modal-backdrop {
    z-index: 2000 !important;
}

/* 移动端额外优化样式 */
@media (max-width: 768px) {
    /* 搜索统计横幅移动端优化 */
    .search-count-banner {
        margin-left: 10px !important;
        margin-right: 10px !important;
        padding: 15px 20px !important;
        font-size: 1.2rem !important;
    }
    
    /* 搜索结果网格移动端优化 */
    .search-results-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 10px;
    }
    
    /* 产品详情模态框移动端优化 */
    .product-modal {
        padding: 5px !important;
    }
    
    .product-modal > div {
        max-height: 95vh !important;
        margin: 0 !important;
    }
    
    /* 图片预览模态框移动端优化 */
    .image-preview-modal {
        padding: 5px !important;
    }
    
    /* 通知系统移动端优化 */
    .notification {
        left: 10px !important;
        right: 10px !important;
        transform: translateY(-100px) !important;
        transition: transform 0.3s ease !important;
        max-width: none !important;
        margin: 0 !important;
    }
    
    .notification.show {
        transform: translateY(0) !important;
    }
    
    /* 移动端触摸反馈 */
    .btn-primary:active,
    .btn-secondary:active,
    .btn-feature:active,
    .btn-add-cart:active,
    .search-btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* 移动端卡片点击效果 */
    .product-card:active,
    .feature-card:active,
    .gallery-item:active,
    .result-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* 移动端导航链接点击效果 */
    .nav-link:active {
        background: rgba(255, 107, 53, 0.2) !important;
        transform: scale(0.95);
    }
    
    /* 移动端表单元素优化 */
    input, select, textarea {
        font-size: 16px !important; /* 防止iOS缩放 */
    }
    
    /* 移动端滚动条隐藏 */
    ::-webkit-scrollbar {
        width: 0px;
        background: transparent;
    }
    
    /* 移动端选择文本优化 */
    * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* 允许文本内容选择 */
    p, span, h1, h2, h3, h4, h5, h6, li, td, th {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* 输入框允许选择 */
    input, textarea {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* 超小屏幕优化 (iPhone SE等) */
@media (max-width: 375px) {
    .nav-logo {
        font-size: 18px;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .search-box input {
        padding: 10px 40px 10px 12px;
        font-size: 14px;
    }
    
    .search-btn {
        width: 35px;
        height: 35px;
        right: 3px;
    }
    
    .feature-card,
    .product-card,
    .gallery-item {
        margin: 0 2px;
        padding: 15px 12px;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-container {
        padding: 80px 20px 30px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    .brick-showcase {
        max-width: 240px;
    }
    
    .features,
    .products,
    .gallery-preview,
    .search-section,
    .about-section {
        padding: 40px 0;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image,
    .hero-image,
    .feature-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    /* 这里可以添加深色模式样式，目前保持浅色主题 */
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 搜索功能样式 */
.search-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,107,53,0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(52,152,219,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--brick-orange);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.2);
}

.search-box input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
    color: #333;
}

.search-box input::placeholder {
    color: #999;
    font-style: italic;
}

.search-btn {
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    color: white;
    border: none;
    padding: 20px 30px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--brick-yellow), var(--brick-orange));
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.search-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.search-filters select {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.search-filters select:focus {
    outline: none;
    border-color: var(--brick-orange);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

.search-filters select:hover {
    border-color: var(--brick-orange);
    transform: translateY(-2px);
}

.search-stats {
    margin-bottom: 30px;
}

.search-results {
    min-height: 300px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.search-results:not(:empty) {
    border-color: rgba(255, 107, 53, 0.1);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    width: 100%;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 107, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 15px;
    width: 16px;
    height: 16px;
    background: var(--brick-orange);
    border-radius: 50% 50% 0 0;
    z-index: 2;
    box-shadow: 
        25px 0 var(--brick-blue),
        50px 0 var(--brick-yellow),
        75px 0 var(--brick-green);
}

.result-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: rgba(255, 107, 53, 0.3);
}

.result-card:hover::before {
    animation: bounce 0.6s ease-in-out;
}

/* 搜索统计横幅样式 */
.search-count-banner {
    background: linear-gradient(135deg, #ff6b35, #ff8a65);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-count-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -40%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.search-count-banner > div {
    position: relative;
    z-index: 2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-section {
        padding: 60px 0;
    }
    
    .search-container {
        padding: 0 20px;
    }
    
    .search-box {
        margin-bottom: 20px;
    }
    
    .search-box input {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .search-btn {
        padding: 15px 25px;
        font-size: 1.1rem;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .search-filters select {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .search-results {
        padding: 20px;
        margin: 0 10px;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .result-card {
        padding: 20px;
        margin: 0;
    }
    
    .result-card::before {
        display: none;
    }
    
    .search-count-banner {
        padding: 15px 20px;
        margin: 0 10px 20px;
        font-size: 0.9rem;
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    transform: translateY(100px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: linear-gradient(135deg, var(--brick-yellow), var(--brick-orange));
    transform: translateY(0) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.back-to-top.show {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,107,53,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52,152,219,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    color: var(--brick-orange);
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.footer-section h4 {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 3px;
    background: linear-gradient(135deg, var(--brick-orange), var(--brick-yellow));
    border-radius: 2px;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
    color: #bdc3c7;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-section ul li:hover {
    color: var(--brick-orange);
    transform: translateX(5px);
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: var(--brick-orange);
}

.footer-section ul li i {
    margin-right: 10px;
    width: 16px;
    color: var(--brick-orange);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #bdc3c7;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-links a:hover {
    background: var(--brick-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--brick-orange);
}

.beian {
    margin-top: 15px;
}

.beian p {
    margin: 5px 0;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.beian a {
    color: #95a5a6;
    text-decoration: none;
}

.beian a:hover {
    color: var(--brick-orange);
}

.beian img {
    vertical-align: middle;
    margin-right: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section ul li {
        text-align: center;
    }
    
    .footer-section ul li:hover {
        transform: none;
    }
    
    .beian {
        margin-top: 20px;
    }
    
    .beian p {
        font-size: 0.75rem;
    }
} 