/* ==========================================
   数字科技蓝风格 - 公共样式文件
   ========================================== */

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

:root {
    /* 主色调 - 数字科技蓝系列 */
    --deep-tech-blue: #0A1628;          /* 深海科技蓝 */
    --electric-blue: #00A3FF;           /* 电光蓝 */
    --navy-blue: #1E3A5F;               /* 藏青蓝 */
    --bright-blue: #00D4FF;             /* 亮蓝 */
    
    /* 辅助色 */
    --white: #FFFFFF;
    --light-gray: #F5F7FA;
    --gray: #8B95A5;
    --dark-gray: #4A5568;
    
    /* 功能色 */
    --tech-red: #FF4757;                /* 科技红 */
    --success-green: #10B981;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0, 163, 255, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 163, 255, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 163, 255, 0.2);
    
    /* 边框圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 间距 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 通用容器 */
.container {
    width: 1200px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* 链接样式 */
a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 按钮基础样式 */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--electric-blue) 0%, var(--navy-blue) 100%);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--bright-blue) 0%, var(--electric-blue) 100%);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--navy-blue);
    border: 1px solid var(--electric-blue);
}

.btn-secondary:hover {
    background: var(--navy-blue);
    color: var(--white);
}

/* ==========================================
   导航栏样式
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--deep-tech-blue);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.95) 0%, rgba(10, 22, 40, 0.8) 100%);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.logo-text .highlight {
    color: var(--electric-blue);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-item {
    position: relative;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--gray);
    transition: all 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue), var(--bright-blue));
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: var(--electric-blue);
}

.nav-item:hover::after {
    width: 100%;
}

.nav-item.active {
    color: var(--electric-blue);
}

.nav-item.active::after {
    width: 100%;
}

/* ==========================================
   页面主体
   ========================================== */
.main {
    flex: 1;
    padding-top: 70px; /* 导航栏高度 */
}

/* ==========================================
   底部栏样式
   ========================================== */
.footer {
    background: var(--deep-tech-blue);
    border-top: 1px solid rgba(0, 163, 255, 0.2);
    padding: var(--spacing-md) 0;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
}

.footer-text {
    font-size: 18px;
    line-height: 40px;
    font-weight: 400;
    color: #FFFFFF;
}

/* ==========================================
   卡片基础样式
   ========================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 163, 255, 0.2);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    border-color: var(--electric-blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* ==========================================
   表单样式
   ========================================== */
.form-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 163, 255, 0.3);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    max-width: 500px;
    margin: var(--spacing-xl) auto;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--deep-tech-blue);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-gray);
    margin-bottom: var(--spacing-xs);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

.form-input::placeholder {
    color: var(--gray);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray);
    border-radius: var(--radius-md);
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-textarea:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

.form-input-file {
    width: 100%;
    padding: 12px 16px;
    border: 2px dashed var(--gray);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-input-file:hover {
    border-color: var(--electric-blue);
    background: rgba(0, 163, 255, 0.05);
}

.price-tip {
    text-align: center;
    color: var(--dark-gray);
    font-size: 14px;
    margin-bottom: var(--spacing-md);
}

.price-tip .highlight {
    color: var(--electric-blue);
    font-weight: 700;
    font-size: 16px;
}

/* ==========================================
   页面动画
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ==========================================
   首页样式
   ========================================== */
.home-banner img {
    width: 100%;
}



.banner-content {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 0 20px rgba(0, 163, 255, 0.5);
}

.banner-subtitle {
    font-size: 16px;
    color: var(--gray);
}

.home-section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--deep-tech-blue);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

/* 首页信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.info-card {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.info-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--light-gray);
}

.info-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-tech-blue);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.info-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--gray);
    margin-top: auto;
}

.info-card-publisher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.publisher-tag {
    color: var(--tech-red);
    font-weight: 500;
}

/* ==========================================
   列表页样式
   ========================================== */
.list-header {
    background: var(--deep-tech-blue);
    padding: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
}

.list-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40px;
    background: linear-gradient(180deg, var(--electric-blue), var(--bright-blue));
}

.list-header-inner {
    position: relative;
}

.list-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    padding-left: var(--spacing-md);
}

.list-section {
    padding: var(--spacing-xl) 0;
}

/* 列表页信息网格 */
.list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.list-item-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    cursor: pointer;
}

.list-item-card:hover {
    transform: scale(1.02);
}

.list-item-image {
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--light-gray);
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-xs);
}

.list-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--deep-tech-blue);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-publisher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--dark-gray);
}

/* ==========================================
   详情页样式
   ========================================== */
.detail-section {
    padding: var(--spacing-xl) 0;
}

.detail-container {
    display: grid;
    grid-template-columns: 600px 1fr;
    gap: var(--spacing-xl);
}

.detail-image-wrapper {
    position: sticky;
    top: 90px;
}

.detail-image {
    width: 100%;
    border-radius: var(--radius-lg);
    border: 2px solid rgba(0, 163, 255, 0.3);
    box-shadow: var(--shadow-md);
    background-color: var(--light-gray);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--deep-tech-blue);
    line-height: 1.4;
}

.detail-intro {
    background: linear-gradient(135deg, rgba(0, 163, 255, 0.05) 0%, rgba(30, 58, 95, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    border-left: 3px solid var(--electric-blue);
}

.detail-intro-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-tech-blue);
    margin-bottom: var(--spacing-sm);
}

.detail-intro-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--dark-gray);
    text-indent: 2em;
}

.detail-publisher {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.detail-publisher-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--electric-blue), var(--navy-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
}

.detail-publisher-info {
    flex: 1;
}

.detail-publisher-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--deep-tech-blue);
}

.detail-publisher-label {
    font-size: 13px;
    color: var(--gray);
}

.contact-section {
    border-top: 1px solid rgba(0, 163, 255, 0.2);
    padding-top: var(--spacing-md);
}

.contact-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--electric-blue) 0%, var(--navy-blue) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--bright-blue) 0%, var(--electric-blue) 100%);
}

.contact-phone {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(0, 163, 255, 0.1) 0%, rgba(30, 58, 95, 0.1) 100%);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--electric-blue);
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.contact-phone.show {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

/* ==========================================
   登录/注册页样式
   ========================================== */
.auth-page {
    min-height: calc(100vh - 70px - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gray) 0%, rgba(0, 163, 255, 0.05) 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.auth-form .form-input {
    padding: 14px 16px;
}

.auth-form .btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 16px;
    margin-top: var(--spacing-md);
}

.auth-links {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--gray);
    font-size: 14px;
}

.auth-links a {
    color: var(--electric-blue);
    margin-left: var(--spacing-xs);
}

.auth-links a:hover {
    color: var(--bright-blue);
    text-decoration: underline;
}

/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 1250px) {
    .container {
        width: 100%;
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .list-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .detail-image-wrapper {
        position: static;
    }
    
    .list-item-image {
        width: 200px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .list-item-card {
        flex-direction: column;
    }
    
    .list-item-image {
        width: 100%;
        height: 180px;
    }
    
    .banner-title {
        font-size: 28px;
    }
    
    .form-container {
        margin: var(--spacing-md);
        padding: var(--spacing-lg);
    }
}
