:root {
    --primary: #1a1a1a;
    --secondary: #333;
    --accent: #ff4757;
    --light: #f8f9fa;
    --dark: #212529;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body {
    background-color: #f0f2f5;
    color: var(--dark);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.logo h1 {
    margin: 0;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

nav {
    flex: 1;
    min-width: 0;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-list li {
    margin: 0.25rem 0.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav ul li a:hover {
    opacity: 0.8;
}

.diamond-icon {
    width: 20px;
    height: 20px;
}

main {
    padding: 2rem 0;
}

.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash.danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: #ff2e43;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-footer p {
    margin: 0.5rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.video-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
}

.video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card h3, .video-card h4 {
    margin: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.video-info {
    padding: 0 1rem 1rem;
}

.video-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.like-btn, .favorite-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50px;
    padding: 0.4rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.like-btn:hover, .favorite-btn:hover {
    background: #f8f9fa;
}

.like-btn.liked {
    background-color: #e3f2fd;
    color: #2196f3;
    border-color: #bbdefb;
}

.favorite-btn.favorited {
    background-color: #fff8e1;
    color: #ffc107;
    border-color: #ffecb3;
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-player {
    background: #000;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-player video {
    width: 100%;
    display: block;
}

.locked-video {
    padding: 3rem;
    text-align: center;
    color: white;
}

.locked-video i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.locked-video p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.video-details {
    display: flex;
    gap: 2rem;
}

.video-info {
    flex: 1;
}

.uploader-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #666;
}

.uploader-diamonds {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: #666;
}

.video-actions {
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

.profile-container {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-header {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #666;
}

.diamond-balance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.tab.active {
    background-color: var(--accent);
    color: white;
}

.tab-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* 搜索表单样式 */
.search-form {
    flex: 1;
    max-width: 400px;
    min-width: 150px;
    margin-right: 1rem;
}

.search-form form {
    display: flex;
}

.search-form input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 200px;
}

.search-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 缩略图容器 */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background-color: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频时长显示 */
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* 锁定视频样式 */
.locked-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 宽高比 */
    background-color: #000;
}

.locked-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 10;
}

.locked-overlay i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.locked-overlay p {
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
}

/* 小型购买按钮 */
.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-small:hover {
    background: #ff2e43;
}

.actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* 账号管理样式 */
.account-management {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .account-management {
        grid-template-columns: 1fr;
    }
}

.account-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.account-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 验证码输入样式 */
.verification-input {
    display: flex;
    gap: 0.5rem;
}

.verification-input input {
    flex: 1;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* 钻石管理样式 */
.diamond-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.diamond-balance-large {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.diamond-icon-large {
    width: 40px;
    height: 40px;
}

.diamond-actions {
    display: flex;
    gap: 1rem;
}

.btn-recharge, .btn-withdraw {
    flex: 1;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s, opacity 0.2s;
}

.btn-recharge {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-withdraw {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-recharge:hover, .btn-withdraw:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.diamond-tips {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 0.9rem;
}

.diamond-tips p {
    margin: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.diamond-tips i {
    color: #6c757d;
    margin-top: 3px;
}

/* 忘记密码页面样式 */
/*
.forgot-step {
    display: none;
}

.forgot-step:first-child {
    display: block;
}
*/

.verification-input {
    display: flex;
    gap: 0.5rem;
}

.verification-input input {
    flex: 1;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background: var(--dark);
    color: white;
    text-align: center;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-details {
        flex-direction: column;
    }
    
    .video-actions {
        flex-direction: row;
        justify-content: center;
    }
}