/* 魔法影视模板样式 */
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
}

/* 明亮主题 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-accent: #f1f3f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 暗黑主题 */
.dark-theme {
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-accent: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #3a3a3a;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

ul, li {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.app-header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-content {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-img {
    width: 32px;
    height: 32px;
}

/* 导航 */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 40px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
}

.nav-item:hover {
    background-color: var(--bg-accent);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.nav-item img {
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
    filter: brightness(0.8);
}

.nav-item.active img {
    filter: brightness(1) invert(1);
}

/* 右侧操作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 搜索框 */
.search-box {
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    width: 280px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 50px 0 20px;
    font-size: 14px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: var(--bg-accent);
}

.search-btn img {
    width: 16px;
    height: 16px;
}

/* 主题切换按钮 */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-accent);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    transform: scale(1.05);
}

.theme-toggle img {
    width: 18px;
    height: 18px;
}

/* 用户区域 */
.user-section {
    position: relative;
}

.login-actions {
    display: flex;
    gap: 12px;
}

.login-btn, .register-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-btn {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.login-btn:hover {
    background-color: var(--bg-accent);
}

.register-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-light);
}

.register-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background-color: var(--bg-accent);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 160px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-accent);
}

.dropdown-item img {
    width: 16px;
    height: 16px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

/* 主内容区域 */
.app-main {
    flex: 1;
    padding: 20px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .search-input {
        width: 200px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .user-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 160px;
    }
    
    .login-actions .login-btn,
    .login-actions .register-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.border-radius { border-radius: 8px; }
.border-radius-lg { border-radius: 12px; }
.border-radius-xl { border-radius: 16px; }

.shadow-sm { box-shadow: var(--shadow-light); }
.shadow-md { box-shadow: var(--shadow-medium); }

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-accent { background-color: var(--bg-accent); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }