/* 影流 M.SRL - 公共样式 */
/* Netflix 高级感主题 - 参考 Netflix 官方设计 */

/* 引入高级字体 Inter (Netflix Sans 替代) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Netflix 精确色彩系统 */
    --netflix-black: #000000;
    --netflix-bg: #141414;
    --netflix-surface: #181818;
    --netflix-surface-light: #232323;
    --netflix-surface-hover: #2a2a2a;

    --netflix-red: #E50914;
    --netflix-red-hover: #f6121d;
    --netflix-red-glow: rgba(229, 9, 20, 0.4);

    --netflix-white: #ffffff;
    --netflix-gray-100: #e5e5e5;
    --netflix-gray-200: #b3b3b3;
    --netflix-gray-300: #808080;
    --netflix-gray-400: #5a5a5a;
    --netflix-gray-500: #333333;

    --netflix-success: #46d369;
    --netflix-warning: #e6b91e;

    /* 阴影系统 - 创造深度 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.7), 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8), 0 8px 16px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(229, 9, 20, 0.3);

    /* 动画曲线 - Netflix 风格 */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== 移动端优化 ========== */

/* 禁止页面整体橡皮筋效果 */
html {
    overflow: hidden;
    height: 100%;
    /* 禁止 iOS Safari 橡皮筋效果 */
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* 全局背景噪点纹理 - 增加质感 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--netflix-black);
    color: var(--netflix-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.015em;
    /* 禁止橡皮筋效果 */
    overscroll-behavior-y: none;
    /* 禁止双击缩放 */
    touch-action: manipulation;
}

/* 移动端禁止文字选择（可选，提升体验） */
@media (max-width: 768px) {
    body {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* 允许输入框选择 */
    input, textarea {
        -webkit-user-select: auto;
        user-select: auto;
    }
    
    /* 禁止长按弹出菜单 */
    img, a {
        -webkit-touch-callout: none;
    }
}

/* 添加微妙的噪点纹理覆盖 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    z-index: 9999;
}

/* 顶部导航 - 更精致的渐变 */
.navbar {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    padding: 20px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.4s var(--ease-out-expo);
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: baseline;
    font-size: 28px;
    font-weight: 900;
    color: var(--netflix-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(229, 9, 20, 0.3);
    /* Netflix 风格弧形效果 */
    transform: perspective(500px) rotateX(5deg);
    transform-origin: center bottom;
}

.brand-logo span {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 16px;
    margin-left: 8px;
    letter-spacing: 2px;
    /* 中文与英文基线对齐 */
    position: relative;
    top: -1px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease-in-out);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--netflix-red) 0%, #b20710 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--netflix-gray-400);
    color: var(--netflix-gray-200);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.25s var(--ease-out-expo);
}

.btn-logout:hover {
    border-color: var(--netflix-white);
    color: var(--netflix-white);
    background: rgba(255, 255, 255, 0.05);
}

/* 按钮通用样式 - 高级感 */
.btn-copy {
    background: linear-gradient(180deg, var(--netflix-red) 0%, #c40812 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.25s var(--ease-out-expo);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-copy::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 var(--ease-out-expo);
}

.btn-copy:hover {
    background: linear-gradient(180deg, var(--netflix-red-hover) 0%, var(--netflix-red) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-copy:active {
    transform: translateY(0);
}

.btn-copy.copied {
    background: linear-gradient(180deg, var(--netflix-success) 0%, #3ab85a 100%);
    box-shadow: var(--shadow-md), 0 0 20px rgba(70, 211, 105, 0.3);
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--netflix-gray-300);
    font-weight: 500;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--netflix-surface-light);
    border-top-color: var(--netflix-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 16px;
}

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

.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: var(--netflix-gray-300);
}

.empty-state .icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.hidden { display: none !important; }

/* 公告弹窗 - 高级感 */
.notice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s var(--ease-out-expo);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.notice-modal {
    background: var(--netflix-surface);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--netflix-gray-500);
    animation: modalSlideIn 0.4s var(--ease-out-expo);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notice-modal-header {
    background: linear-gradient(135deg, var(--netflix-red) 0%, #b20710 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.notice-modal-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.3px;
}

.notice-modal-close {
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-in-out);
}

.notice-modal-close:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: rotate(90deg);
}

.notice-modal-body {
    padding: 28px;
    max-height: 55vh;
    overflow-y: auto;
}

.notice-modal-item {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--netflix-gray-500);
}

.notice-modal-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.notice-modal-item-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
    color: var(--netflix-red);
    letter-spacing: 0.3px;
}

.notice-modal-item-content {
    font-size: 14px;
    color: var(--netflix-gray-200);
    line-height: 1.8;
    white-space: pre-wrap;
}

.notice-modal-item-date {
    font-size: 12px;
    color: var(--netflix-gray-400);
    margin-top: 14px;
    font-weight: 500;
}

.notice-modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--netflix-gray-500);
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
}

.btn-notice-close {
    background: linear-gradient(180deg, var(--netflix-red) 0%, #c40812 100%);
    border: none;
    color: white;
    padding: 14px 56px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.25s var(--ease-out-expo);
    box-shadow: var(--shadow-md);
}

.btn-notice-close:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* 滚动条 - 更精致 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--netflix-black);
}

::-webkit-scrollbar-thumb {
    background: var(--netflix-gray-500);
    border-radius: 5px;
    border: 2px solid var(--netflix-black);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-gray-400);
}

/* 文字选择 */
::selection {
    background: var(--netflix-red);
    color: white;
}

/* 链接样式 */
a {
    color: inherit;
    text-decoration: none;
}

/* 错误消息 */
.error-message {
    background: #e87c03;
    color: var(--netflix-white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* 成功消息 */
.success-message {
    background: var(--netflix-success);
    color: #000;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* ========== 通用页面背景 ========== */

.page-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.9) 100%),
                linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f3460 100%);
    z-index: -1;
}

/* ========== 通用卡片 ========== */

.card {
    background: rgba(0, 0, 0, 0.75);
    border-radius: var(--radius-sm);
    padding: 60px 68px 40px;
    width: 100%;
    max-width: 450px;
}

@media (max-width: 600px) {
    .card {
        padding: 40px 24px;
        margin: 0 15px;
    }
}

/* ========== 状态颜色类 ========== */

.text-success { color: var(--netflix-success); }
.text-warning { color: var(--netflix-warning); }
.text-danger { color: var(--netflix-red); }
.text-muted { color: var(--netflix-gray-300); }

.bg-success { background-color: rgba(70, 211, 105, 0.2); }
.bg-warning { background-color: rgba(230, 185, 30, 0.2); }
.bg-danger { background-color: rgba(229, 9, 20, 0.2); }

/* 响应式基础 */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 4%;
    }

    .brand-logo {
        font-size: 22px;
    }

    .brand-logo span {
        display: none;
    }

    .btn-copy {
        padding: 10px 18px;
        font-size: 12px;
    }
}
