/* style.css - 完整优化版（包含Banner+纸质感背景+修复按钮问题+表单样式） */

/* ===== 颜色变量 ===== */
:root {
    --bg: #fefefe;
    --text: #1a1a1a;
    --accent: #d35400;
    --accent-light: rgba(211, 84, 0, 0.1);
    --gray: #f9f9f9;
    --light-gray: #f5f5f5;
    --card-bg: rgba(255, 255, 255, 0.85);
    --header-bg: rgba(255, 255, 255, 0.92);
    --banner-blue: #2c3e50;
    --banner-gold: rgba(255, 215, 0, 0.15);
}

/* ===== 基础样式 ===== */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden; /* 防止水平滚动 */
}

/* 纸质感背景 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.02"><path d="M0,0 L100,0 L100,100 Z" fill="%23d35400"/></svg>');
    background-size: 200px 200px;
    pointer-events: none;
    z-index: -2;
}

/* 顶部渐变遮罩 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.7) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    z-index: -1;
}

/* ===== 顶部品牌区 ===== */
.top-left-brand {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 20;
    padding: 8px 12px;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.top-left-brand img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.top-left-brand img:hover {
    transform: scale(1.1);
}

.slogan {
    font-size: 14px;
    line-height: 20px;
    color: #777;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    padding-left: 12px;
}

.slogan::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 16px;
    background: linear-gradient(to bottom, #d35400, #f39c12);
}
.detail-view video {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    /* 可选：添加一些边距或圆角 */
    margin: 20px 0;
    border-radius: 8px;
}
/* ===== Banner区域 ===== */
.header-banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(15deg, 
        rgba(255,250,245,0.95) 0%, 
        rgba(255,253,251,0.98) 100%
    );
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

/* Canvas墨迹效果 */
.banner-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: multiply;
    opacity: 0.9;
    z-index: 1;
}

/* Banner标题区 */
.header-banner header {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 160px 20px 50px 20px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    margin-bottom: 0;
}

.header-banner .main-title {
    font-size: 5rem;
    font-weight: 200;
    letter-spacing: 20px;
    margin: 0;
    color: var(--text);
    text-decoration: none;
    display: inline-block;
    position: relative;
    padding: 0 20px 15px 20px;
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        0 0 0 5px rgba(255,255,255,0.3);
    transition: all 0.5s ease;
    z-index: 4;
}

.header-banner .main-title:hover {
    letter-spacing: 22px;
    text-shadow: 
        0 2px 6px rgba(0,0,0,0.15),
        0 0 0 8px rgba(255,255,255,0.4);
}

.header-banner .main-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(211, 84, 0, 0.7), 
        rgba(44, 62, 80, 0.7),
        rgba(211, 84, 0, 0.7),
        transparent
    );
    border-radius: 2px;
}

/* Banner副标题 */
.subtitle {
    font-size: 1.3rem;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--banner-blue);
    margin-top: 20px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding: 0 20px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.subtitle::before,
.subtitle::after {
    content: "•";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.8rem;
    opacity: 0.7;
    text-shadow: 0 0 5px var(--banner-gold);
}

.subtitle::before { left: 0; }
.subtitle::after { right: 0; }

/* ===== 装饰元素 ===== */
.header-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        #f39c12 25%, 
        #e74c3c 50%, 
        #3498db 75%, 
        var(--banner-blue) 100%
    );
    background-size: 200% 100%;
    animation: gradientShift 8s ease infinite;
    z-index: 5;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.top-line {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 2;
}

.line-segment {
    width: 40px;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(211, 84, 0, 0.5), 
        transparent
    );
}

/* ===== 返回按钮 ===== */
.back-btn {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 20px 10px 30px;
    border-radius: 25px;
    border: 1px solid rgba(211, 84, 0, 0.15);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(211, 84, 0, 0.08);
    padding-left: 35px;
    padding-right: 25px;
}

.back-btn::before {
    content: "←";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: left 0.3s ease;
}

.back-btn:hover::before {
    left: 13px;
}

/* ===== 内容区域 ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 100px 20px;
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border-radius: 16px 16px 0 0;
    box-shadow: 
        0 -10px 40px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 10;
    box-sizing: border-box; /* 重要：防止溢出 */
}

/* ===== 项目名称 ===== */
.project-name {
    text-align: center;
    font-weight: 200;
    font-size: 1.8rem;
    letter-spacing: 8px;
    margin-bottom: 50px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 25px;
    color: var(--banner-blue);
}

.project-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: linear-gradient(to right, 
        transparent, 
        var(--accent), 
        var(--banner-blue), 
        var(--accent),
        transparent
    );
}

/* ===== 网格卡片 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 50px;
    justify-content: center;
}

.card {
    text-decoration: none;
    color: inherit;
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    box-sizing: border-box; /* 确保内边距不影响总宽度 */
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(211, 84, 0, 0.25);
    box-shadow: 
        0 20px 50px rgba(211, 84, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===== 图片框 ===== */
.img-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-radius: 8px;
    position: relative;
}

.img-box::before {
    content: '';
    position: absolute;
    opacity: 0; /* 已修改：默认隐藏蒙层 */
    transition: opacity 0.3s ease;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

.card:hover .img-box::before {
    opacity: 0.3; /* 悬停时显示轻微蒙层 */
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.card h3 {
    margin-top: 20px;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    color: #555;
    padding: 15px 0 5px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===== 详情页面 ===== */
.detail-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden; /* 防止内容溢出 */
    box-sizing: border-box; /* 确保内边距包含在宽度内 */
}

.detail-view video,
.detail-view img {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 8px;
    display: block;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.07),
        0 2px 5px rgba(0, 0, 0, 0.12);
}

/* ===== 修复后的按钮样式 ===== */
.action-buttons {
    text-align: center;
    margin: 40px 0 60px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 20px; /* 添加内边距防止按钮触边 */
    box-sizing: border-box;
}

.btn {
    min-width: 240px; /* 设置最小宽度 */
    max-width: 300px; /* 设置最大宽度 */
    padding: 18px 30px;
    border-radius: 50px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 232, 214, 0.95) 100%
    );
    color: #d35400;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(211, 84, 0, 0.15);
    box-sizing: border-box; /* 确保内边距不增加总宽度 */
    flex: 1 1 auto; /* 允许按钮在容器内伸缩 */
    text-align: center;
    word-break: keep-all; /* 防止单词断行 */
    white-space: nowrap; /* 防止文本换行 */
}

.btn:hover {
    background: linear-gradient(135deg, 
        rgba(255, 157, 108, 0.95) 0%, 
        rgba(255, 126, 58, 0.95) 100%
    );
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 
        0 12px 35px rgba(211, 84, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(211, 84, 0, 0.2);
}

/* ===== 让Shop on Etsy按钮始终保持悬停状态的高亮橙色 ===== */
.btn[href*="etsy.com"] {
    background: linear-gradient(135deg, 
        rgba(255, 157, 108, 0.95) 0%, 
        rgba(255, 126, 58, 0.95) 100%
    ) !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    border-color: rgba(211, 84, 0, 0.2) !important;
    box-shadow: 
        0 12px 35px rgba(211, 84, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn[href*="etsy.com"]:hover {
    transform: translateY(-5px) !important;
    box-shadow: 
        0 15px 45px rgba(211, 84, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* ===== 文本内容区域 ===== */
.text-content {
    max-width: 700px;
    margin: 50px auto;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #444;
    padding: 40px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.03);
}

/* ===== 自定义表单样式（新增） ===== */
.custom-form-container {
    animation: fadeIn 0.3s ease-out;
}

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

.custom-form-container input,
.custom-form-container textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-form-container input:focus,
.custom-form-container textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    /* Banner区域响应式 */
    .header-banner {
        height: 300px;
    }
    
    .header-banner header {
        padding: 120px 15px 40px 15px;
    }
    
    .header-banner .main-title {
        font-size: 2.5rem;
        letter-spacing: 10px;
    }
    
    .header-banner .main-title:hover {
        letter-spacing: 11px;
    }
    
    .subtitle {
        font-size: 1rem;
        letter-spacing: 3px;
        margin-top: 15px;
    }
    
    /* 装饰元素响应式 */
    .top-line {
        top: 80px;
        gap: 25px;
    }
    
    .line-segment {
        width: 25px;
    }
    
    /* 品牌区响应式 */
    .top-left-brand {
        top: 15px;
        left: 15px;
        padding: 6px 10px;
    }
    
    .slogan {
        font-size: 12px;
        letter-spacing: 0.8px;
    }
    
    /* 内容区域响应式 */
    .container {
        padding: 25px 15px 80px 15px;
        border-radius: 12px 12px 0 0;
    }
    
    /* 网格响应式 */
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .card {
        padding: 15px;
    }
    
    /* 返回按钮响应式 */
    .back-btn {
        top: 20px;
        padding: 8px 15px 8px 25px;
        font-size: 0.75rem;
    }
    
    /* 项目名称响应式 */
    .project-name {
        font-size: 1.4rem;
        letter-spacing: 6px;
        margin-bottom: 40px;
    }
    
    /* 详情视图响应式 */
    .detail-view {
        padding: 20px;
    }
    
    /* ===== 修复：按钮移动端优化 ===== */
    .action-buttons {
        flex-direction: column; /* 垂直排列 */
        align-items: center; /* 居中对齐 */
        gap: 15px;
        padding: 0 15px;
    }
    
    .btn {
        width: 100%; /* 占据可用宽度 */
        max-width: 320px; /* 限制最大宽度 */
        min-width: 0; /* 覆盖桌面端的固定最小宽度 */
        padding: 16px 25px;
        font-size: 0.8rem;
        letter-spacing: 1.2px;
    }
    
    /* 针对较长文本按钮的特别优化 */
    .btn:nth-child(2) { /* 第二个按钮 "Customize / Opinions" */
        font-size: 0.75rem; /* 稍微减小字体 */
        letter-spacing: 1px;
        padding: 16px 20px;
    }
    
    /* 使表单在移动端更友好 */
    .custom-form-container {
        padding: 25px 20px !important;
        margin: 40px 15px !important;
    }
    
    .custom-form-container .btn {
        padding: 14px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* 超小屏幕额外优化 */
@media (max-width: 480px) {
    .header-banner {
        height: 250px;
    }
    
    .header-banner .main-title {
        font-size: 1.8rem;
        letter-spacing: 6px;
    }
    
    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* ===== 修复：按钮超小屏幕优化 ===== */
    .action-buttons {
        padding: 0 10px;
    }
    
    .btn {
        max-width: 100%; /* 在非常小的屏幕上使用全宽 */
        padding: 15px 20px;
        font-size: 0.75rem;
    }
    
    .btn:nth-child(2) {
        font-size: 0.7rem; /* 进一步减小字体 */
        letter-spacing: 0.8px;
        padding: 14px 18px;
    }
}