/* iOS 7 毛玻璃风格视频平台样式 */

:root {
    --primary-color: #007AFF;
    --bg-light: rgba(255, 255, 255, 0.8);
    --bg-dark: rgba(30, 30, 30, 0.8);
    --text-light: #000;
    --text-dark: #fff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-dark);
}

/* 毛玻璃效果 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.dark-mode .glass {
    background: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.dark-mode .sidebar {
    background: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .sidebar-header {
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.sidebar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 5px 0;
    border-radius: 2px;
    transition: 0.3s;
}

/* API列表 */
.api-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.api-item {
    padding: 15px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .api-item {
    background: rgba(255, 255, 255, 0.1);
}

.api-item:hover {
    background: rgba(0, 122, 255, 0.2);
    transform: translateX(5px);
}

.api-item.active {
    background: var(--primary-color);
    color: white;
}

.api-item .vip-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .sidebar-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin-bottom: 10px;
}

.dark-mode .user-info {
    background: rgba(255, 255, 255, 0.1);
}

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

.user-nickname {
    flex: 1;
    font-weight: 500;
}

.btn-logout {
    background: rgba(255, 59, 48, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ff3b30;
}

.btn-logout:hover {
    background: #ff3b30;
    color: white;
    transform: scale(1.1);
}

.btn-login, .btn-profile, .btn-theme {
    width: 100%;
    padding: 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dark-mode .btn-login,
.dark-mode .btn-profile,
.dark-mode .btn-theme {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.btn-login:hover, .btn-profile:hover, .btn-theme:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-profile svg, .btn-theme svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 主内容区 */
.main-content {
    margin-left: 280px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.video-container {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.video-play-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5;
    pointer-events: none;
}

.play-hint-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border: none;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.play-hint-btn:hover {
    background: rgba(0, 122, 255, 0.9);
    transform: scale(1.15);
    box-shadow: 0 12px 48px rgba(0, 122, 255, 0.4);
}

.play-hint-btn svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* 视频控制栏 */
.video-controls {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 30px;
}

.control-btn-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-btn {
    width: 75px;
    height: 75px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

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

.control-btn svg {
    width: 36px;
    height: 36px;
    fill: white;
}

.control-btn.liked {
    background: #ff3b30;
}

#likeCount {
    margin-top: 8px;
    font-size: 16px;
    color: white;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 35px;
    text-align: center;
}

#commentCount {
    margin-top: 8px;
    font-size: 16px;
    color: white;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 35px;
    text-align: center;
}

/* 音量控制 */
.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-slider-container {
    position: absolute;
    left: -145px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.volume-control:hover .volume-slider-container,
.volume-slider-container:hover {
    opacity: 1;
    visibility: visible;
}

.volume-slider {
    width: 100px;
    height: 6px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 评论面板 */
.comment-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.dark-mode .comment-panel {
    background: var(--bg-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.comment-panel.active {
    right: 0;
}

.comment-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode .comment-header {
    border-color: rgba(255, 255, 255, 0.1);
}

.close-btn {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: currentColor;
}

.comment-input {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .comment-input {
    border-color: rgba(255, 255, 255, 0.1);
}

.comment-input textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    resize: none;
    font-family: inherit;
    margin-bottom: 10px;
}

.dark-mode .comment-input textarea {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.comment-input button {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.comment-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin-bottom: 10px;
    color: #333;
}

.dark-mode .comment-item {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.comment-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

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

.comment-user strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.dark-mode .comment-user strong {
    color: white;
}

.comment-time {
    font-size: 12px;
    opacity: 0.6;
    margin-left: auto;
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #333;
}

.dark-mode .comment-content {
    color: rgba(255, 255, 255, 0.9);
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dark-mode .comment-action-btn {
    color: rgba(255, 255, 255, 0.7);
}

.comment-action-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.dark-mode .comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.comment-replies {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .comment-replies {
    border-left-color: rgba(255, 255, 255, 0.2);
}

.comment-item.reply {
    background: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.dark-mode .comment-item.reply {
    background: rgba(255, 255, 255, 0.05);
}

/* 回复输入框 */
.reply-input-wrapper {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: none;
}

.dark-mode .reply-input-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

.reply-input-wrapper.active {
    display: block;
}

.reply-input-wrapper textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background: white;
    color: #333;
    resize: none;
    font-family: inherit;
    font-size: 13px;
    min-height: 60px;
}

.dark-mode .reply-input-wrapper textarea {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.reply-input-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.reply-input-actions button {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reply-input-actions .btn-cancel {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.dark-mode .reply-input-actions .btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.reply-input-actions .btn-submit {
    background: var(--primary-color);
    color: white;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 35px 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
}

.dark-mode .modal-content {
    background: var(--bg-dark);
}

.close-modal {
    display: none;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

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

.auth-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
}

.dark-mode .auth-form input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dark);
}

.auth-form button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .video-controls {
        right: 10px;
        padding: 10px;
        gap: 10px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    .comment-panel {
        width: 100%;
    }
}

/* 点赞动画 */
.like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: likeFloat 1s ease-out forwards;
    z-index: 100;
}

@keyframes likeFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -60%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(1);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

.loading {
    text-align: center;
    padding: 20px;
    color: rgba(0, 0, 0, 0.5);
}

.dark-mode .loading {
    color: rgba(255, 255, 255, 0.5);
}
