:root {
    --primary-color: #2196F3;
    --hover-color: #1976D2;
    --background: #f0f2f5;
    --text-color: #333;
    --card-bg: #fff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --primary-color: #6b8cff;
    --hover-color: #4a6dff;
    --background: #1a1a1a;
    --text-color: #f0f0f0;
    --card-bg: #2d2d2d;
    --nav-bg: rgba(45, 45, 45, 0.9);
    --border-color: rgba(255,255,255,0.1);
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--background);
    color: var(--text-color);
    padding: 80px 20px 20px;
    transition: all 0.3s ease;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-buttons {
    display: flex;
    gap: 10px;
}

.navbar-buttons button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.navbar-buttons button:hover {
    background: rgba(255,255,255,0.1);
}

/* 主题切换按钮 */
.theme-switch {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.3s;
}

/* 悬浮发布按钮 */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    transition: all 0.3s;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.modal-content {
    background: linear-gradient(145deg, var(--card-bg) 0%, rgba(255,255,255,0.1) 100%);
    width: 95%;
    max-width: 500px;
    margin: 100px auto; /* 避免与导航栏重叠 */
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content.show {
    transform: translateY(0);
    opacity: 1;
}

/* 视频弹窗 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1001;
}

.video-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-content video {
    width: 100%;
    height: auto;
}

/* 音乐控制悬浮栏 */
.music-control-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
}

.music-control-bar img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.music-control-bar button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 15px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px var(--border-color);
    transition: transform 0.2s;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

/* 音乐卡片 */
.music-card {
    position: relative;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.music-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    filter: blur(20px);
    opacity: 0.8;
}

.music-content {
    position: relative;
    display: flex;
    align-items: center;
    padding: 15px;
}

.music-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    margin-right: 15px;
}

.music-control {
    margin-left: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

/* 视频容器 */
.video-container {
    position: relative;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
}

.video-container:hover {
    transform: scale(1.02);
}

.video-container video {
    width: 100%;
    height: auto;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* 图片预览 */
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    z-index: 2000;
    cursor: pointer;
}

.preview-image {
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 1.5rem;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: var(--hover-color);
}

@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
    }
    .music-cover {
        width: 40px;
        height: 40px;
    }
}

.modal-content {
    max-height: 85vh;
    overflow-y: auto;
    padding: 1rem;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
}

.like-button.liked {
    color: red;
}
