/* ========================================
   青岛软视智能科技 - 炫酷科技风主题
   ======================================== */

/* 导入科技感字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --color-text: #e0e7ff;
    --color-muted: #94a3b8;
    --color-bg: #030712;
    --color-surface: #0f172a;
    --color-primary: #38bdf8;
    --color-primary-dark: #0284c7;
    --color-accent: #22d3ee;
    --color-accent-purple: #a78bfa;
    --color-accent-pink: #f472b6;
    --color-neon-green: #4ade80;
    --color-border: #1e3a5f;
    --color-shadow: rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(56, 189, 248, 0.15);
    --glow-primary: 0 0 20px rgba(56, 189, 248, 0.4);
    --glow-accent: 0 0 20px rgba(34, 211, 238, 0.4);
}

/* 全局动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px var(--color-primary), 0 0 10px var(--color-primary), 0 0 15px var(--color-primary); }
    50% { box-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary), 0 0 30px var(--color-primary); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(56, 189, 248, 0.3); }
    50% { border-color: rgba(34, 211, 238, 0.6); }
}

@keyframes textGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); }
    50% { text-shadow: 0 0 20px rgba(56, 189, 248, 0.8), 0 0 30px rgba(34, 211, 238, 0.6); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

body {
    margin: 0;
    font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 网格背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3 {
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    color: #f8fafc;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Accessibility: focus ring */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: var(--glow-primary);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}
a:hover,
a:focus-visible {
    color: var(--color-accent);
    text-shadow: 0 0 10px var(--color-accent);
}

/* 链接卡片样式 */
.item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 头部样式 ========== */
header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
    backdrop-filter: saturate(180%) blur(12px);
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 -1px 0 rgba(56, 189, 248, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: borderGlow 3s ease-in-out infinite;
}

header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

#logo {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.5));
    animation: float 4s ease-in-out infinite;
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    letter-spacing: 3px;
    background: linear-gradient(90deg, #38bdf8, #22d3ee, #a78bfa, #38bdf8);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ========== 导航菜单样式 ========== */
nav {
    margin-left: auto;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 4px;
}
nav ul li {
    position: relative;
}
nav ul li a {
    display: block;
    padding: 12px 18px;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95em;
    letter-spacing: 1px;
    border-radius: 8px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li:hover > a::before,
nav ul li a:focus-visible::before {
    width: 80%;
}

nav ul li:hover > a,
nav ul li a:focus-visible {
    background: rgba(56, 189, 248, 0.1);
    color: #fff;
    text-shadow: 0 0 10px var(--color-primary);
    box-shadow: inset 0 0 20px rgba(56, 189, 248, 0.1);
}

/* 二级菜单 (下拉部分) */
nav ul ul {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--glass-border);
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.1);
    padding: 12px 8px;
    border-radius: 12px;
    backdrop-filter: blur(16px) saturate(180%);
    flex-direction: column;
    gap: 4px;
}

nav ul ul::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
}

nav ul li:hover > ul {
    display: flex;
}

/* 二级菜单项 */
nav ul ul li {
    width: 100%;
}
nav ul ul li a {
    padding: 10px 16px;
    white-space: nowrap;
    font-weight: 500;
    color: var(--color-muted);
    border-radius: 8px;
    font-size: 0.9em;
}
nav ul ul li a::before {
    display: none;
}
nav ul ul li a:hover,
nav ul ul li a:focus-visible {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.15), rgba(34, 211, 238, 0.1));
    color: #fff;
    transform: translateX(4px);
}

/* ========== 主要内容区域 ========== */
main {
    padding: 40px 0;
    position: relative;
}

/* Hero区域 */
.hero-section {
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

.hero-section h2 {
    font-size: 3em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #38bdf8 0%, #22d3ee 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite;
}

.hero-section .tagline {
    font-size: 1.4em;
    color: var(--color-muted);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

/* 科技按钮 */
.tech-button {
    display: inline-block;
    padding: 14px 36px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #030712;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.tech-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.6);
    color: #030712;
    text-shadow: none;
}

.tech-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.tech-button:hover::before {
    left: 100%;
}

section {
    margin-bottom: 50px;
    padding: 40px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--color-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
    opacity: 0.5;
}

section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2em;
    color: #f8fafc;
    position: relative;
    display: inline-block;
    width: 100%;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    border-radius: 2px;
}

/* ========== 网格布局 (产品/项目) ========== */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.item {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.item:hover::before {
    opacity: 1;
}

.item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
}

.item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
}

.item:hover img {
    transform: scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.item h3 {
    margin: 0 0 10px;
    font-size: 1.3em;
    color: #f8fafc;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.item:hover h3 {
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
}

.item p {
    font-size: 0.95em;
    color: var(--color-muted);
    text-align: left;
    min-height: 60px;
    line-height: 1.7;
}

/* ========== 尾部样式 ========== */
footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), #030712);
    color: var(--color-muted);
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}

footer p {
    margin: 0;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* 首页产品显示 */
.item .image-ratio-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 120%;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.item .image-ratio-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
}
.item img.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.item:hover img.product-image {
    transform: scale(1.08);
}

/* 首页项目显示 */
.item .image-ratio-wrapper2 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 60%;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.item .image-ratio-wrapper2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
}
.item img.product-image2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.item:hover img.product-image2 {
    transform: scale(1.08);
}

/* 页面内容容器 (共享) */
.page-content-container {
    padding: 30px 0;
}
.page-content-container h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #f8fafc;
}
.section-muted {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
}

/* 服务页面使用的文本块 */
.service-description {
    margin-bottom: 28px;
    line-height: 1.9;
    color: var(--color-text);
    font-size: 1.05em;
}
.service-description h3 {
    margin: 28px 0 14px;
    color: var(--color-primary);
    border-left: 4px solid var(--color-primary);
    padding-left: 14px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}
.service-description ul,
.service-description ol {
    list-style-position: inside;
    padding-left: 1.2em;
    margin: 0 0 16px;
}
.service-description li {
    margin-bottom: 10px;
    position: relative;
}

/* Call to action */
.collaboration-cta {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-top: 30px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}
.collaboration-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
}
.collaboration-cta p {
    margin-bottom: 14px;
    font-size: 1.1em;
    color: #f8fafc;
}
.collaboration-cta strong {
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* 代表性图片包装器 */
.representative-image-wrapper {
    text-align: center;
    margin-bottom: 24px;
}
.representative-image-wrapper img {
    max-width: 60%;
    height: auto;
    border: 1px solid var(--glass-border);
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.1);
    background-color: rgba(15, 23, 42, 0.8);
    border-radius: 16px;
    transition: all 0.4s ease;
}
.representative-image-wrapper img:hover {
    transform: scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.2);
}

/* ========== 响应式调整 ========== */
@media (max-width: 992px) {
    header h1 {
        font-size: 1.2em;
    }
    .hero-section h2 {
        font-size: 2.2em;
    }
    .hero-section .tagline {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    #logo {
        margin-bottom: 8px;
    }
    header h1 {
        font-size: 1.1em;
    }
    nav {
        margin-left: 0;
        width: 100%;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }
    nav ul li a {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    nav ul ul {
        min-width: 180px;
        left: 50%;
        transform: translateX(-50%);
    }
    .item-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-section {
        padding: 50px 16px;
    }
    .hero-section h2 {
        font-size: 1.8em;
    }
    .hero-section .tagline {
        font-size: 1em;
    }
    section {
        padding: 30px 16px;
        border-radius: 14px;
    }
    section h2 {
        font-size: 1.6em;
    }
    .representative-image-wrapper img {
        max-width: 95%;
    }
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}
.mt-0 {
    margin-top: 0;
}
.mb-0 {
    margin-bottom: 0;
}
.mb-8 {
    margin-bottom: 8px;
}
.mb-12 {
    margin-bottom: 12px;
}
.mb-16 {
    margin-bottom: 16px;
}
.mt-16 {
    margin-top: 16px;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
}

/* ========== 选中文本样式 ========== */
::selection {
    background: rgba(56, 189, 248, 0.3);
    color: #fff;
}

/* ========== 加载动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}
