/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f63a55;
    --secondary-color: #007AFF;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f8f8;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
    border-radius: 2px;
}

.nav-toggle:hover span {
    background: var(--primary-color);
}

/* 英雄区域 */
.hero {
    background: #fff;
    color: var(--text-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: none;
    outline: none;
}

.hero .container {
    background: linear-gradient(135deg, rgba(246, 58, 85, 0.85) 0%, rgba(255, 107, 122, 0.85) 50%, rgba(255, 140, 159, 0.85) 100%),
                url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?w=1920&h=1080&fit=crop') center/cover no-repeat;
    padding: 80px 40px;
    position: relative;
    overflow: hidden;
    color: var(--white);
    border: none;
    outline: none;
}

.hero .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    border-radius: 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero .container {
    max-width: 1200px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: #e02d47;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(246, 58, 85, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* 功能区域 */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b7a);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid rgba(246, 58, 85, 0.1);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(246, 58, 85, 0.15);
    border-color: rgba(246, 58, 85, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), #ff6b7a);
    border-radius: 20px;
    color: var(--white);
    font-size: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(246, 58, 85, 0.3);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
}

/* 流程步骤 */
.process {
    padding: 80px 0;
    background: var(--bg-color);
}

.process-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.step-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), #ff6b7a);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(246, 58, 85, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.step:hover .step-number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(246, 58, 85, 0.4);
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.step p {
    color: var(--text-light);
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-arrow i {
    transition: transform 0.3s;
}

.step:hover ~ .step-arrow i,
.step-arrow:hover i {
    transform: translateX(5px);
}

/* 供应商预览 */
.suppliers-preview {
    padding: 80px 0;
    background: var(--white);
}

.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.supplier-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(246, 58, 85, 0.1);
}

.supplier-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(246, 58, 85, 0.15);
    border-color: rgba(246, 58, 85, 0.3);
}

.supplier-logo {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-color);
    transition: transform 0.3s ease;
}

.supplier-card:hover .supplier-logo {
    transform: scale(1.05);
}

.supplier-info {
    padding: 1.5rem;
}

.supplier-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.supplier-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.supplier-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.supplier-stats i {
    color: var(--primary-color);
    margin-right: 4px;
}

.supplier-stats .fa-star {
    color: #ffc107;
}

.text-center {
    text-align: center;
}

/* 统计数据 */
.stats {
    padding: 80px 0;
    background: var(--bg-color);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.stats .container {
    background: linear-gradient(135deg, #f63a55 0%, #ff6b7a 50%, #ff8c9f 100%);
    border-radius: 20px;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.stats .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    border-radius: 20px;
}

.stats-grid {
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* 入驻申请页面 */
.register-section {
    padding: 60px 0;
    background: var(--bg-color);
}

.register-header {
    text-align: center;
    margin-bottom: 3rem;
}

.register-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.register-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.register-form {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 20px;
}

/* 文件上传 */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-color);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background: rgba(60, 197, 31, 0.05);
}

.file-upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.file-upload-label:hover .file-upload-icon {
    transform: scale(1.1);
}

.file-upload-text {
    color: var(--text-light);
}

.file-name {
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* 供应商列表页面 */
.suppliers-page {
    padding: 60px 0;
    background: var(--bg-color);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.filters {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    white-space: nowrap;
}

.filter-select,
.search-input {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(246, 58, 85, 0.1);
}

.search-input {
    min-width: 250px;
}

#searchBtn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.suppliers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(246, 58, 85, 0.3);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(246, 58, 85, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #e02d47;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(246, 58, 85, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        padding: 60px 20px;
    }

    .stats .container {
        padding: 40px 20px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}
