/* ===== 基础与变量重置 ===== */
:root {
    --primary-color: #ff758c;
    --primary-hover: #ff7eb3;
    --bg-glass: rgba(255, 255, 255, 0.25);
    --bg-glass-dark: rgba(0, 0, 0, 0.4);
    --border-glass: rgba(255, 255, 255, 0.4);
    --text-main: #2c3e50;
    --text-light: #f5f6fa;
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    background-color: #0f172a;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 动态二次元背景 */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* 使用一张高质量的二次元风景占位图 */
    background: url('https://images.unsplash.com/photo-1578632767115-351597cf2477?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: -1;
    /* 增加一个非常轻微的暗色覆盖层以便文字可见 */
    filter: brightness(0.9) saturate(1.2);
    animation: slowPan 60s infinite alternate linear;
}

@keyframes slowPan {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* ===== 毛玻璃组件基础 ===== */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

/* ===== 顶部导航栏 ===== */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 30px;
    transition: var(--transition);
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

nav ul li a:hover, nav ul li a.active {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

/* 按钮通用 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.6);
}

.btn-primary:active {
    transform: translateY(1px);
}

.full-width {
    width: 100%;
}

/* ===== 主体布局 ===== */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    min-height: calc(100vh - 150px);
}

/* 内容区 */
.content-area {
    padding: 30px;
    background: rgba(255, 255, 255, 0.85); /* 让主内容区更亮一点方便阅读 */
    border-radius: 24px;
    overflow-y: auto;
}

/* 标题样式 */
.page-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px dashed #ffb6c1;
    padding-bottom: 10px;
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: white;
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-left: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.news-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
}

.news-meta {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    gap: 15px;
}

.news-meta span {
    background: #f1f2f6;
    padding: 3px 8px;
    border-radius: 10px;
}

/* 音乐/电影列表项 (Mock Data UI) */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.media-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    cursor: pointer;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 117, 140, 0.3);
}

.media-cover {
    height: 150px;
    background: #e0e6ed;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.media-play-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0;
    transition: var(--transition);
    transform: scale(0.8);
}

.media-card:hover .media-play-btn {
    opacity: 1;
    transform: scale(1);
}

.media-info {
    padding: 15px;
}

.media-title {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-desc {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* ===== 右侧侧边栏 ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    padding: 20px;
    background: rgba(0, 0, 0, 0.5); /* 暗色毛玻璃，对比主内容 */
    color: white;
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 时钟 */
.clock-widget {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 117, 140, 0.8), rgba(255, 126, 179, 0.8));
    backdrop-filter: blur(16px);
}

.clock-widget .time {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.clock-widget .date {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* 天气 */
.weather-widget {
    text-align: center;
}
.weather-temp {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 10px 0;
}

/* 快捷入口 */
.links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.link-item {
    background: rgba(255,255,255,0.15);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.link-item:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ===== 模态弹窗 (模拟登录) ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: 24px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover { color: #e74c3c; }

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.modal-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

/* 模拟登录状态反馈区 */
.feedback-msg {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s;
}

.feedback-msg.error {
    background: #ffeaa7;
    color: #d35400;
    border-left: 4px solid #e17055;
}

.hidden {
    display: none !important;
}

/* Loading Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 117, 140, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 117, 140, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-state {
    text-align: center;
    padding: 50px;
    color: #7f8c8d;
}

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

/* Toast 提示 */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 响应式 */
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
    }
    nav ul {
        gap: 15px;
    }
    .glass-nav {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

/* ===== 详情页通用样式 ===== */
.detail-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.back-btn {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-5px);
}

.player-container, .cloud-detail, .api-detail {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail-title {
    font-size: 2rem;
    color: var(--text-main);
    margin: 20px 0 10px;
}

.detail-desc {
    color: #7f8c8d;
    margin-bottom: 30px;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 黑胶唱片机样式 (Music) ===== */
.record-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 20px auto;
}

.record {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 0 10px #222, inset 0 0 0 20px #111, inset 0 0 0 30px #222;
    /* 假装旋转的动画，其实一直停着，假装在等播放 */
    transition: transform 0.3s;
}

.record:hover {
    transform: scale(1.05);
}

.record-center {
    width: 80px;
    height: 80px;
    background: #e0e6ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 4px solid var(--primary-color);
}

.stylus {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 120px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M80 10 L40 70 L20 80" stroke="%23bdc3c7" stroke-width="6" fill="none"/><circle cx="80" cy="10" r="10" fill="%237f8c8d"/><circle cx="20" cy="80" r="5" fill="%23e74c3c"/></svg>') no-repeat center;
    transform-origin: 80px 10px;
    transform: rotate(-20deg); /* 移开状态 */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.music-player:hover .stylus {
    transform: rotate(5deg); /* 悬停时假装搭上去 */
}

/* 进度条通用 */
.progress-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.time-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-variant-numeric: tabular-nums;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 30px;
}

.ctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
}

.icon-btn {
    font-size: 1.5rem;
    opacity: 0.7;
}

.icon-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 117, 140, 0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 117, 140, 0.6);
}

/* ===== 视频播放器样式 (Movie) ===== */
.movie-player {
    padding: 0;
    overflow: hidden;
}

.video-screen {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1a1a2e, #16213e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.big-play-btn {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.big-play-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.video-overlay-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
}

.video-info {
    padding: 20px 30px 0;
    text-align: left;
    width: 100%;
}

.video-info .detail-title { margin-top: 0; }

.video-controls {
    width: 100%;
    padding: 20px 30px;
    background: rgba(255,255,255,0.5);
}

.ctrl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.left-ctrls, .right-ctrls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== 云盘详情样式 (Cloud) ===== */
.file-icon-large {
    font-size: 6rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
}

.file-meta {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.safe-badge {
    background: #e8f8f5;
    color: #27ae60;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #a3e4d7;
}

.file-size-info {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.action-box {
    display: flex;
    gap: 20px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 2px solid #ecf0f1;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== API 详情样式 (API) ===== */
.api-detail {
    align-items: stretch;
    text-align: left;
}

.api-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.5);
    padding: 15px 20px;
    border-radius: 12px;
}

.method {
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    color: white;
}

.method.get { background: #3498db; }
.method.post { background: #2ecc71; }

.endpoint {
    font-family: monospace;
    font-size: 1.1rem;
    color: #2c3e50;
    word-break: break-all;
}

.code-block {
    background: #282c34;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.code-header {
    background: #21252b;
    padding: 10px 20px;
    color: #abb2bf;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.status-code {
    color: #98c379;
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', Consolas, monospace;
    color: #e5c07b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.api-detail .action-box {
    justify-content: flex-start;
}
