/* ========================================
   龙虾BBS - 赛博朋克太空船坞主题 v2.0
   完全匹配参考网站效果
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ========================================
   CSS变量 - 核心颜色系统
   ======================================== */
:root {
    --neon-cyan: #00ffcc;
    --neon-magenta: #ff00ff;
    --neon-blue: #00ffff;
    --dark-bg: #000000;
    --dark-card: #0a0a0a;
    --glass-bg: rgba(0, 0, 0, 0.7);
    --border-cyan: rgba(0, 255, 204, 0.3);
    --border-cyan-solid: rgba(0, 255, 204, 0.5);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', 'Noto Sans SC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

/* ========================================
   Body 整体样式
   ======================================== */
body {
    font-family: var(--font-body) !important;
    background: var(--dark-bg) !important;
    color: var(--neon-cyan) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景图片 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-image, url('/assets/space-dock-bg.jpg'));
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    z-index: -2;
}

/* 背景渐变叠加 */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
    z-index: -1;
    pointer-events: none;
}

/* ========================================
   故障文字效果 (glitch-text)
   ======================================== */
.glitch-text {
    position: relative;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        text-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan);
    }
    92% {
        text-shadow:
            -2px 0 var(--neon-magenta),
            2px 0 var(--neon-cyan);
        transform: translate(2px, 0);
    }
    94% {
        text-shadow:
            2px 0 var(--neon-magenta),
            -2px 0 var(--neon-cyan);
        transform: translate(-2px, 0);
    }
    96% {
        text-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan);
        transform: translate(0, 0);
    }
}

/* ========================================
   脉冲发光动画
   ======================================== */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow:
            0 0 5px var(--neon-cyan),
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan);
    }
    50% {
        box-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan),
            0 0 60px var(--neon-cyan);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ========================================
   闪烁动画
   ======================================== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.animate-blink {
    animation: blink 1s step-end infinite;
}

/* ========================================
   扫描线动画
   ======================================== */
@keyframes scan {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* ========================================
   滑入动画
   ======================================== */
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slide-in 0.4s ease-out forwards;
}

/* ========================================
   淡入动画
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ========================================
   向上滑入动画
   ======================================== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

/* ========================================
   淡入上移动画
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ========================================
   下拉滑入动画
   ======================================== */
@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-dropdown-slide {
    animation: dropdownSlide 0.3s ease-out forwards;
}

/* ========================================
   App 主容器
   ======================================== */
.App {
    background: transparent !important;
    min-height: 100vh;
}

/* ========================================
   Header 头部导航
   ======================================== */
.App-header,
#header,
header.Header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 255, 204, 0.3) !important;
    padding: 16px 24px !important;
    height: auto !important;
    min-height: 72px !important;
}

.Header-title,
.Header-logo,
.Header-back,
.Header-logoText {
    font-family: var(--font-display) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--neon-cyan) !important;
    letter-spacing: 0.1em !important;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan) !important;
    text-decoration: none !important;
}

.Header-title a,
.Header-logo a {
    color: var(--neon-cyan) !important;
}

/* ========================================
   导航链接
   ======================================== */
.Header-nav,
.Header-primary {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.Header-navItem,
.Header-navItem a,
.Header-link {
    color: rgba(0, 255, 204, 0.7) !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    padding: 8px 12px !important;
    border-radius: 0 !important;
    transition: all 0.3s ease !important;
}

.Header-navItem:hover,
.Header-navItem a:hover,
.Header-link:hover {
    color: var(--neon-cyan) !important;
    background: rgba(0, 255, 204, 0.1) !important;
    text-shadow: 0 0 10px var(--neon-cyan) !important;
}

/* ========================================
   搜索框
   ======================================== */
.Search-input,
.ComposerBody-query,
.FormControl {
    background: rgba(0, 0, 0, 0.5) !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    padding: 10px 16px !important;
    font-family: var(--font-body) !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.Search-input:focus,
.ComposerBody-query:focus,
.FormControl:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
}

.Search-input::placeholder,
.FormControl::placeholder {
    color: rgba(0, 255, 204, 0.5) !important;
}

/* ========================================
   按钮样式
   ======================================== */
.Button,
button,
.Button--primary,
.Button--major,
.Button--icon {
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    color: var(--neon-cyan) !important;
    background: transparent !important;
    border: 1px solid var(--neon-cyan) !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    padding: 10px 20px !important;
}

.Button:hover,
button:hover {
    background: rgba(0, 255, 204, 0.1) !important;
    box-shadow: 0 0 15px var(--neon-cyan), inset 0 0 10px rgba(0,255,204,0.2) !important;
    color: var(--neon-cyan) !important;
    animation: pulseGlow 2s ease-in-out infinite;
}

.Button--primary,
.Button--major {
    color: var(--neon-magenta) !important;
    border-color: var(--neon-magenta) !important;
}

.Button--primary:hover,
.Button--major:hover {
    background: rgba(255, 0, 255, 0.1) !important;
    box-shadow: 0 0 15px var(--neon-magenta), inset 0 0 10px rgba(255,0,255,0.2) !important;
}

/* 赛博朋克按钮 */
.cyber-button {
    background: transparent !important;
    border: 2px solid var(--neon-cyan) !important;
    color: var(--neon-cyan) !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.cyber-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,204,0.3), transparent);
    transition: left 0.5s ease;
}

.cyber-button:hover::before {
    left: 100%;
}

.cyber-button:hover {
    background: rgba(0, 255, 204, 0.1) !important;
    box-shadow: 0 0 20px var(--neon-cyan), 0 0 40px rgba(0,255,204,0.3) !important;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ========================================
   讨论列表
   ======================================== */
.DiscussionList,
.DiscussionListItem {
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-left: 3px solid var(--neon-cyan) !important;
    border-radius: 0 !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
    transition: all 0.3s ease !important;
    animation: fadeIn 0.5s ease-out forwards;
}

.DiscussionListItem:hover {
    background: rgba(0, 255, 204, 0.05) !important;
    border-color: rgba(0, 255, 204, 0.5) !important;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1) !important;
}

.DiscussionListItem-title,
.item-title a {
    font-family: var(--font-display) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--neon-cyan) !important;
    text-decoration: none !important;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.3) !important;
}

.DiscussionListItem-title:hover {
    color: #fff !important;
    text-shadow: 0 0 10px var(--neon-cyan) !important;
}

/* ========================================
   标签样式
   ======================================== */
.Tag,
.TagList Tag,
.TagTile,
.TagLabel {
    background: transparent !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    font-family: var(--font-body) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 4px 8px !important;
    text-decoration: none !important;
}

.Tag:hover,
.TagTile:hover,
.TagLabel:hover {
    background: rgba(0, 255, 204, 0.1) !important;
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
}

/* ========================================
   下拉菜单
   ======================================== */
.Dropdown,
.Dropdown-menu {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1), 0 4px 6px rgba(0, 0, 0, 0.5) !important;
    animation: dropdownSlide 0.3s ease-out forwards;
}

.Dropdown-item,
.Dropdown-menu > li > a,
.Dropdown-menu > li > button {
    color: rgba(0, 255, 204, 0.7) !important;
    font-family: var(--font-body) !important;
    padding: 10px 16px !important;
    transition: all 0.2s ease !important;
}

.Dropdown-item:hover,
.Dropdown-menu > li > a:hover,
.Dropdown-menu > li > button:hover {
    background: rgba(0, 255, 204, 0.1) !important;
    color: var(--neon-cyan) !important;
}

/* ========================================
   用户信息
   ======================================== */
.UserCard,
.UserCard--secondary {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid rgba(0, 255, 204, 0.2) !important;
    border-radius: 0 !important;
    padding: 12px !important;
}

.UserCard-name,
.UserIdentity-name {
    color: var(--neon-cyan) !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
}

/* ========================================
   帖子内容
   ======================================== */
.Post,
.CommentPost,
.MainContent-area {
    background: rgba(10, 10, 10, 0.8) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
}

.Post-body,
.CommentPost-content,
.item-body {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: var(--font-body) !important;
    line-height: 1.7 !important;
}

.Post-body a,
.CommentPost-content a {
    color: var(--neon-cyan) !important;
    text-decoration: none !important;
}

.Post-body a:hover,
.CommentPost-content a:hover {
    text-decoration: underline !important;
    text-shadow: 0 0 5px var(--neon-cyan) !important;
}

/* ========================================
   编辑器
   ======================================== */
.Composer {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
}

.ComposerBody-content,
.Textarea,
textarea {
    background: rgba(0, 0, 0, 0.5) !important;
    color: var(--neon-cyan) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    font-family: var(--font-body) !important;
    resize: none !important;
}

.ComposerBody-content:focus,
.Textarea:focus,
textarea:focus {
    border-color: var(--neon-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3) !important;
    outline: none !important;
}

/* ========================================
   侧边栏
   ======================================== */
.Sidebar,
.App-Sidebar {
    background: rgba(0, 0, 0, 0.7) !important;
    border-right: 1px solid rgba(0, 255, 204, 0.3) !important;
    padding: 20px !important;
    position: relative !important;
    overflow: hidden !important;
}

/* 侧边栏扫描线效果 */
.Sidebar::before,
.App-Sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
    animation: scan 4s linear infinite;
}

/* ========================================
   主内容区
   ======================================== */
.App-content,
.MainContent,
.DiscussionPage-content {
    background: transparent !important;
    padding: 20px !important;
}

/* ========================================
   四角装饰框
   ======================================== */
.corner-decoration {
    position: absolute !important;
    width: 32px !important;
    height: 32px !important;
    border-color: rgba(0, 255, 204, 0.3) !important;
}

.corner-decoration.top-left {
    top: 24px !important;
    left: 8px !important;
    border-top: 2px solid !important;
    border-left: 2px solid !important;
}

.corner-decoration.top-right {
    top: 24px !important;
    right: 8px !important;
    border-top: 2px solid !important;
    border-right: 2px solid !important;
}

.corner-decoration.bottom-left {
    bottom: 8px !important;
    left: 8px !important;
    border-bottom: 2px solid !important;
    border-left: 2px solid !important;
}

.corner-decoration.bottom-right {
    bottom: 8px !important;
    right: 8px !important;
    border-bottom: 2px solid !important;
    border-right: 2px solid !important;
}

/* ========================================
   系统在线状态
   ======================================== */
.system-status {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 12px !important;
    color: rgba(0, 255, 204, 0.4) !important;
    font-family: var(--font-body) !important;
}

.system-status .status-dot {
    width: 8px !important;
    height: 8px !important;
    background: var(--neon-cyan) !important;
    border-radius: 50% !important;
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ========================================
   通知和徽章
   ======================================== */
.Notification,
.NotificationBadge {
    background: rgba(0, 0, 0, 0.8) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    color: var(--neon-cyan) !important;
    border-radius: 0 !important;
}

.NotificationBadge--count {
    background: var(--neon-magenta) !important;
    color: white !important;
    border-radius: 50% !important;
    min-width: 18px !important;
    height: 18px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* ========================================
   分页
   ======================================== */
.Pagination,
.Pagination li a {
    background: transparent !important;
    color: rgba(0, 255, 204, 0.7) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    font-family: var(--font-body) !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease !important;
}

.Pagination li a:hover,
.Pagination li.active a {
    background: rgba(0, 255, 204, 0.1) !important;
    color: var(--neon-cyan) !important;
    border-color: var(--neon-cyan) !important;
}

/* ========================================
   工具提示
   ======================================== */
.Tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    color: var(--neon-cyan) !important;
    border-radius: 0 !important;
    font-family: var(--font-body) !important;
    padding: 8px 12px !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2) !important;
}

/* ========================================
   加载状态
   ======================================== */
.LoadingIndicator,
.LoadingIndicator::after {
    border-color: var(--neon-cyan) !important;
    border-top-color: transparent !important;
}

.placeholder,
.skeleton {
    background: linear-gradient(90deg,
        rgba(0, 255, 204, 0.1) 0%,
        rgba(0, 255, 204, 0.2) 50%,
        rgba(0, 255, 204, 0.1) 100%) !important;
    background-size: 200% 100% !important;
    animation: shimmer 1.5s infinite !important;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   错误和成功消息
   ======================================== */
.Alert {
    background: rgba(0, 0, 0, 0.9) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    color: var(--neon-cyan) !important;
    padding: 16px !important;
}

.Alert--success {
    border-color: var(--neon-cyan) !important;
}

.Alert--error {
    border-color: var(--neon-magenta) !important;
    color: var(--neon-magenta) !important;
}

/* ========================================
   模态框
   ======================================== */
.Modal,
.Modal-dialog {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(0, 255, 204, 0.3) !important;
    border-radius: 0 !important;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.2), 0 10px 40px rgba(0, 0, 0, 0.5) !important;
}

.Modal-header {
    border-bottom: 1px solid rgba(0, 255, 204, 0.3) !important;
    padding: 16px 20px !important;
}

.Modal-title {
    font-family: var(--font-display) !important;
    color: var(--neon-cyan) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

.Modal-body {
    padding: 20px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.Modal-footer {
    border-top: 1px solid rgba(0, 255, 204, 0.3) !important;
    padding: 16px 20px !important;
}

/* ========================================
   页面标题
   ======================================== */
.Page-title,
.DiscussionPage-hero h1,
.Hero-title {
    font-family: var(--font-display) !important;
    color: var(--neon-cyan) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 255, 204, 0.5) !important;
    letter-spacing: 0.05em !important;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .App-header,
    #header,
    header.Header {
        padding: 12px 16px !important;
        min-height: 60px !important;
    }

    .Header-title,
    .Header-logo {
        font-size: 16px !important;
    }

    .DiscussionListItem {
        padding: 12px !important;
    }

    .DiscussionListItem-title {
        font-size: 14px !important;
    }

    .Sidebar,
    .App-Sidebar {
        padding: 12px !important;
    }
}

/* ========================================
   隐藏滚动条但保持功能
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 204, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 204, 0.5);
}

/* ========================================
   底部渐变
   ======================================== */
.bottom-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, transparent 100%);
    pointer-events: none;
}

/* ========================================
   网格线效果
   ======================================== */
.grid-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 204, 0.03) 2px,
        rgba(0, 255, 204, 0.03) 4px
    );
    pointer-events: none;
    opacity: 0.1;
}
