/* ========================================
   世纪红 · 数字科技创意工坊 主样式文件
   包含：全局变量、导航栏、页脚、页面通用样式
   ======================================== */

/* ========== 全局变量 ========== */
:root {
    --primary: #ff3366;
    --primary-glow: rgba(255, 51, 102, 0.4);
    --secondary: #7000ff;
    --secondary-glow: rgba(112, 0, 255, 0.4);
    --dark: #0a0a0f;
    --dark-light: #15151f;
    --gray: #2a2a35;
    --text: #ffffff;
    --text-muted: #9a9ab0;
    --gradient-1: linear-gradient(135deg, #ff3366, #7000ff);
    --gradient-2: linear-gradient(45deg, #ff3366, #ff7700);
}

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== 自定义滚动条 ========== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--dark-light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ========== 容器 ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: transparent;
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

/* Logo */
.logo {
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    position: relative;
}

.logo span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

.logo:hover::after {
    width: 100%;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s;
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* 菜单激活状态 */
.nav-menu li.active .nav-link,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-menu li.active .nav-link::before,
.nav-link.active::before {
    transform: scaleX(1) !important;
}

.navbar.scrolled .nav-menu li.active .nav-link,
.navbar.scrolled .nav-link.active {
    color: var(--primary) !important;
}

/* 导航按钮 */
.nav-btn {
    background: var(--gradient-1);
    padding: 12px 30px;
    border-radius: 30px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.nav-btn::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;
}

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

/* ========== 页脚 ========== */
.footer {
    padding: 80px 0 30px;
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-block;
    color: var(--text);
    text-decoration: none;
}

.footer-logo span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 按钮样式 ========== */
.btn-primary {
    padding: 16px 40px;
    background: var(--gradient-1);
    border: none;
    border-radius: 40px;
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.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 {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-outline {
    padding: 16px 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(255, 51, 102, 0.1);
    transform: translateY(-2px);
}

/* ========== 页面通用头部 ========== */
.page-header {
    padding: 180px 0 80px;
    background: var(--dark-light);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.1;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-header h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.page-header h1 span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ========== 服务卡片 ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--dark-light);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(255, 51, 102, 0.2);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.1), rgba(112, 0, 255, 0.1));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    font-size: 30px;
    color: var(--primary);
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-desc {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
}

.service-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s;
}

.service-link:hover {
    gap: 12px;
}

/* ========== 作品集网格 ========== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.work-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
}

.work-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.6s;
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    opacity: 0;
    transition: opacity 0.4s;
}

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

.work-item:hover .work-image {
    transform: scale(1.1);
}

.work-category {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.work-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text);
}

.work-desc {
    color: var(--text-muted);
    font-size: 16px;
    transform: translateY(20px);
    transition: transform 0.4s;
}

.work-item:hover .work-desc {
    transform: translateY(0);
}

/* ========== 技术栈网格 ========== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.tech-item {
    text-align: center;
    padding: 30px;
    background: var(--dark);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(255, 51, 102, 0.1);
}

.tech-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--primary);
}

.tech-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.tech-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== 客户评价 ========== */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--dark-light);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.testimonial-quote {
    font-size: 60px;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
    top: 20px;
    right: 30px;
}

.testimonial-text {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    color: var(--text);
}

.author-info h4 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.author-info p {
    color: var(--text-muted);
    font-size: 14px;
}


/* ========== 调试条 ========== */
.debug-bar {
    background: #333;
    color: #fff;
    padding: 5px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    font-size: 14px;
}

.page-title {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 20px;
}
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 16px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .works-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: repeat(3, 1fr); }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-container { padding: 0 20px; }
    .nav-menu { display: none; }

    .page-header { padding: 140px 0 60px; }
    .page-header h1 { font-size: 36px; }

    .services-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .container { padding: 0 20px; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}