/* ==========================================================================
   数据交易系统 - 样式表
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS 自定义属性（变量定义）
   -------------------------------------------------------------------------- */
:root {
    /* 颜色变量 */
    --color-primary: #06B6D4;
    --color-secondary: #8B5CF6;
    --color-accent: #EC4899;
    --color-dark: #0F172A;
    --color-light: #E2E8F0;
    --color-neon: #22D3EE;
    --color-cosmic: #4F46E5;

    /* 字体变量 */
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-sci: 'Orbitron', sans-serif;

    /* 动画时长 */
    --animation-duration-slow: 4s;
    --animation-duration-medium: 2s;
    --animation-duration-fast: 0.5s;
    --animation-duration-hover: 0.3s;

    /* 过渡时长 */
    --transition-smooth: 0.3s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* --------------------------------------------------------------------------
   2. 重置样式与基础样式
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-dark);
    color: var(--color-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* --------------------------------------------------------------------------
   3. 背景效果样式
   -------------------------------------------------------------------------- */
.bg-stars {
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 1px,
        transparent 1px
    );
    background-size: 50px 50px;
}

/* --------------------------------------------------------------------------
   4. 文本效果样式
   -------------------------------------------------------------------------- */
.text-shadow {
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.neon-border {
    box-shadow: 
        0 0 5px var(--color-primary),
        0 0 10px var(--color-primary);
}

/* 发光文字动画 */
@keyframes glow {
    0% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 15px var(--color-primary),
            0 0 20px var(--color-primary);
    }
    100% {
        text-shadow: 
            0 0 10px #fff,
            0 0 20px #fff,
            0 0 30px var(--color-neon),
            0 0 40px var(--color-neon);
    }
}

.animate-glow {
    animation: glow var(--animation-duration-medium) ease-in-out infinite alternate;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* 脉冲动画（慢速） */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow var(--animation-duration-slow) cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --------------------------------------------------------------------------
   5. 组件交互效果样式
   -------------------------------------------------------------------------- */

/* 英雄区域标题样式 */
.hero-title {
    display: inline;
    text-align: center;
    color: #fff;
    text-shadow: 0px 0px clamp(20px, 3.125vw, 60px) rgba(194, 188, 255, 0.6);
    font-family: PingFang SC, Microsoft YaHei, sans-serif;
    font-size: clamp(2.5rem, 6.04vw, 116px);
    font-style: normal;
    font-weight: 500;
    line-height: 1.2;
    margin: 0.5rem 1rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 星球卡片悬停效果 */
.planet-hover {
    transition: 
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth);
}

.planet-hover:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.7);
}

/* ==========================================================================
   6. 玻璃拟态按钮样式
   ========================================================================== */

.glass-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 9999px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    background: transparent;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-smooth);
    overflow: hidden;
    isolation: isolate;
}

.glass-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(6, 182, 212, 0.3) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.glass-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(6, 182, 212, 0.1) 0%,
        transparent 40%,
        rgba(79, 70, 229, 0.05) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
    z-index: -1;
}

.glass-button:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 0 25px rgba(6, 182, 212, 0.25),
        0 0 50px rgba(79, 70, 229, 0.15);
    border-color: rgba(6, 182, 212, 0.6);
}

.glass-button:hover::after {
    opacity: 1;
}

.glass-button:active {
    transform: translateY(-1px) scale(0.98);
}

.glass-button .fa {
    transition: transform var(--transition-smooth);
}

.glass-button:hover .fa {
    transform: translateX(4px);
}

/* 玻璃拟态按钮 - 变体 */
.glass-button-secondary {
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.15) 0%,
        rgba(236, 72, 153, 0.15) 100%
    );
    border-color: rgba(139, 92, 246, 0.3);
}

.glass-button-secondary:hover {
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(236, 72, 153, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

/* ==========================================================================
   7. 玻璃拟态卡片样式
   ========================================================================== */

.glass-card {
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.6) 0%,
        rgba(15, 23, 42, 0.4) 100%
    );
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all var(--transition-smooth);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 
        0 0 30px rgba(6, 182, 212, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* 按钮基础样式 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: 
        background-color var(--transition-smooth),
        box-shadow var(--transition-smooth),
        transform var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* 滚动条隐藏（用于水平滚动容器） */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* --------------------------------------------------------------------------
   6. 滚动相关样式
   -------------------------------------------------------------------------- */

/* 滚动吸附容器 */
.snap-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

/* 滚动吸附点 */
.snap-point {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* 滚动吸附居中 */
.snap-center {
    scroll-snap-align: center;
}

/* --------------------------------------------------------------------------
   7. 导航栏样式
   -------------------------------------------------------------------------- */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background-color: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(6, 182, 212, 0.3);
}

.nav-link {
    position: relative;
    color: var(--color-light);
    transition: color var(--transition-smooth);
}

.nav-link:hover {
    color: var(--color-neon);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-neon);
    transition: width var(--transition-smooth);
}

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

/* --------------------------------------------------------------------------
   8. 卡片组件样式
   -------------------------------------------------------------------------- */
.card {
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(6, 182, 212, 0.2);
    transition: 
        border-color var(--transition-smooth),
        box-shadow var(--transition-smooth),
        transform var(--transition-smooth);
}

.card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.card-image-container {
    position: relative;
    height: 14rem;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

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

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.8) 0%,
        rgba(15, 23, 42, 0.2) 50%,
        transparent 100%
    );
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.card-description {
    font-size: 0.875rem;
    color: rgba(226, 232, 240, 0.7);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   9. 标签样式
   -------------------------------------------------------------------------- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--color-primary);
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   10. 响应式断点样式
   -------------------------------------------------------------------------- */

/* 小屏幕设备（手机） */
@media screen and (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hide-mobile {
        display: none;
    }
}

/* 中等屏幕设备（平板） */
@media screen and (min-width: 641px) and (max-width: 1024px) {
    .hide-tablet {
        display: none;
    }
}

/* 大屏幕设备（桌面） */
@media screen and (min-width: 1025px) {
    .hide-desktop {
        display: none;
    }
}

/* ========================================================================== 
   11. 工具类样式
   ========================================================================== */

/* Flex 布局工具 */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 文本截断 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 文本换行 */
.text-wrap {
    white-space: normal;
}

/* 容器居中 - 改进版本 */
.container-center {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 弹性盒子居中容器 */
.centered-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* 绝对定位居中 */
.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 网格居中 */
.grid-center {
    display: grid;
    place-items: center;
}

/* ==========================================================================
   12. 响应式居中工具类
   ========================================================================== */

/* 基础响应式居中 */
@media screen and (max-width: 640px) {
    .container-center {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hide-mobile {
        display: none;
    }
    
    .text-center-mobile {
        text-align: center;
    }
    
    .mx-auto-mobile {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 中等屏幕设备（平板） */
@media screen and (min-width: 641px) and (max-width: 1024px) {
    .hide-tablet {
        display: none;
    }
    
    .text-center-tablet {
        text-align: center;
    }
    
    .mx-auto-tablet {
        margin-left: auto;
        margin-right: auto;
    }
}

/* 大屏幕设备（桌面） */
@media screen and (min-width: 1025px) {
    .hide-desktop {
        display: none;
    }
    
    .text-center-desktop {
        text-align: center;
    }
}

/* ==========================================================================
   13. 内容居中增强样式
   ========================================================================== */

/* 水平居中块 */
.centered-block {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Flex 列居中 */
.flex-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 紧密居中内容 */
.tight-center {
    max-width: 80ch;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ==========================================================================
   14. 补充工具类样式
   ========================================================================== */

/* 绝对全屏定位 */
.absolute-full {
    position: absolute;
    inset: 0;
}

/* 圆角工具 */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 阴影工具 */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-neon {
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* 边框工具 */
.border-primary {
    border: 1px solid rgba(6, 182, 212, 0.5);
}

.border-secondary {
    border: 1px solid rgba(139, 92, 246, 0.5);
}

/* 背景透明度工具 */
.bg-dark-40 {
    background-color: rgba(15, 23, 42, 0.4);
}

.bg-dark-60 {
    background-color: rgba(15, 23, 42, 0.6);
}

.bg-dark-80 {
    background-color: rgba(15, 23, 42, 0.8);
}

/* --------------------------------------------------------------------------
   15. 动画延迟类
   -------------------------------------------------------------------------- */
.animation-delay-1s { animation-delay: 1s; }
.animation-delay-2s { animation-delay: 2s; }
.animation-delay-3s { animation-delay: 3s; }
.animation-delay-4s { animation-delay: 4s; }

/* 动画方向类 */
.animation-reverse { animation-direction: reverse; }
.animation-alternate { animation-direction: alternate; }

/* ========================================================================== 
   文件结束
   ========================================================================== */
