/* ====== 主应用样式/var/www/naoneng/app/static/css/main.css====== */
/* 版本: 5.0.0 | 统一层级、标准化图标、删除动画 */

/* 1. 基础重置与变量定义 */
:root {
    /* 颜色系统 */
    --primary-color: #007aff;
    --danger-color: #ff3b30;
    --success-color: #34c759;
    --warning-color: #ff9500;
    
    /* 背景与表面 */
    --bg-dark: #000000;
    --surface-1: #1a1a1a;
    --surface-2: #2a2a2a;
    --surface-3: #3a3a3a;
    
    /* 文本颜色 */
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-tertiary: #888888;
    
    /* 边框与分隔 */
    --border-color: #333333;
    --border-light: #444444;
    
    /* 透明度 */
    --overlay-bg: rgba(0, 0, 0, 0.85);
    
    /* 尺寸系统 */
    --footer-height: 60px;
    --modal-max-width: 500px;
    --modal-max-height: 80vh;
    
    /* 响应式断点 */
    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    
    /* 圆角系统 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    /* 层级系统 */
    --z-video: 0;          /* 视频层：最底层 */
    --z-splash: 1;         /* 启动画面层 */
    --z-right-panel: 100;  /* 右侧面板层 */
    --z-footer: 200;       /* 底部导航栏层 */
    --z-dropdown: 300;     /* 下拉菜单层 */
    --z-modal: 4000;       /* 模态框层 */
    --z-max: 99999;        /* 最高层 */
}

/* 2. 全局基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.5;
    touch-action: pan-y;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 禁止iOS橡皮筋效果 */
body {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
}

/* 3. 视频画面父屏 - 最底层 */
#video-feed-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-video);
    background: #000;
}

/* 4. 启动画面样式 */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: var(--z-splash);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 5. 右侧面板样式 */
.right-panel {
    position: fixed;
    right: 20px;
    top: 450px;
    z-index: var(--z-right-panel);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 右侧面板统一图标和数字样式 */
.right-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    position: relative;
}

.right-icon {
    width: 30px;
    height: 30px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.right-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.count {
    font-size: 12px;
    color: white;
    font-weight: 500;
    margin-top: 4px;
    min-height: 16px;
    text-align: center;
    line-height: 1.2;
}

/* 6. 登录按钮样式 */
.circle-login-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.circle-login-btn.logged-in {
    background: transparent;
}

/* 7. 头像样式 */
.avatar-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid white;
}

.avatar-icon {
    color: white;
    font-size: 12px;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 8. 下拉菜单样式 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-1);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    min-width: 140px;
    max-width: 200px;
    z-index: var(--z-dropdown);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--surface-2);
}

/* 9. 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: rgba(0, 0, 0, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: var(--z-footer);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
    border-top: 1px solid var(--border-color);
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 8px;
    min-width: 50px;
    border-radius: var(--radius-sm);
    flex: 1;
    max-width: 80px;
}

.bottom-nav-btn:hover,
.bottom-nav-btn:active {
    background: var(--surface-2);
    color: var(--text-primary);
}

.bottom-nav-btn.active {
    color: var(--text-primary);
}

.bottom-nav-btn .label {
    font-size: 9px;
    margin-top: 2px;
    font-weight: 500;
    white-space: nowrap;
}

/* 10. 模态框系统 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    z-index: var(--z-modal);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    background: var(--surface-1);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: var(--modal-max-width);
    max-height: min(85vh, 600px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    min-height: 60px;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
    flex: 1;
}

.close-modal {
    background: var(--surface-2);
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 10px;
    flex-shrink: 0;
}

.close-modal:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* 11. 表单系统 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.form-label {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label.required::after {
    content: "*";
    color: var(--danger-color);
    font-size: 12px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
    background: var(--surface-3);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
    line-height: 1.5;
    padding-top: 12px;
    padding-bottom: 12px;
}

.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    background: var(--surface-2);
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--surface-3);
}

.file-upload-icon {
    font-size: 40px;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1;
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.file-upload-main {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.file-upload-sub {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.4;
    max-width: 80%;
    text-align: center;
}

#file-info {
    background: var(--surface-2);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#file-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#file-size {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
}

/* 视频预览 */
#video-preview {
    display: none;
    margin-top: 16px;
    width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: #000;
}

#preview-video {
    width: 100%;
    height: 100%;
    max-height: 180px;
    object-fit: contain;
    display: block;
    background: #000;
}

/* 上传进度 */
#upload-progress {
    background: var(--surface-2);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 16px;
    width: 100%;
    display: none;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.progress-text span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #5ac8fa);
    width: 0%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* 12. 按钮系统 */
.form-btn {
    width: 100%;
    padding: 15px 20px;
    background: var(--primary-color);
    color: var(--text-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.form-btn:hover {
    background: #0056cc;
}

.form-btn:disabled {
    background: var(--surface-3);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.form-btn.loading {
    background: var(--surface-3);
    color: transparent;
    pointer-events: none;
}

.form-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--text-primary);
    border-radius: 50%;
}

/* 错误消息 */
.error-message {
    color: var(--danger-color);
    font-size: 13px;
    margin-top: 8px;
    display: none;
    background: rgba(255, 59, 48, 0.1);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger-color);
    line-height: 1.4;
}

.error-message.show {
    display: block;
}

/* 切换链接 */
.form-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
    padding: 8px 0;
}

.form-switch a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

.form-switch a:hover {
    background: rgba(0, 122, 255, 0.1);
    text-decoration: none;
}

/* 13. 响应式设计 */

/* 平板设备 (768px以下) */
@media (max-width: 768px) {
    .modal {
        padding: 12px;
    }
    
    .modal-content {
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }
    
    .modal-header {
        padding: 16px;
        min-height: 56px;
    }
    
    .modal-body {
        padding: 16px;
        gap: 16px;
    }
    
    .file-upload-area {
        padding: 24px 16px;
        min-height: 100px;
    }
    
    .file-upload-icon {
        font-size: 36px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .form-btn {
        padding: 16px 20px;
        min-height: 52px;
    }
    
    .bottom-nav {
        height: 56px;
    }
    
    .bottom-nav-btn {
        padding: 6px 4px;
        font-size: 18px;
        min-width: 44px;
    }
    
    .bottom-nav-btn .label {
        font-size: 8px;
    }
}

/* 手机设备 (480px以下) */
@media (max-width: 480px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .file-upload-area {
        padding: 20px 16px;
        min-height: 90px;
    }
    
    .file-upload-icon {
        font-size: 32px;
    }
    
    .file-upload-main {
        font-size: 13px;
    }
    
    .file-upload-sub {
        font-size: 11px;
    }
    
    #video-preview {
        max-height: 180px;
    }
    
    #preview-video {
        max-height: 160px;
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="password"],
    input[type="email"],
    textarea {
        font-size: 16px;
    }
}

/* 小手机设备 (360px以下) */
@media (max-width: 360px) {
    .modal-body {
        padding: 16px;
    }
    
    .file-upload-area {
        padding: 16px 12px;
        min-height: 80px;
    }
    
    .file-upload-icon {
        font-size: 28px;
    }
    
    .file-upload-main {
        font-size: 12px;
    }
    
    .file-upload-sub {
        font-size: 10px;
    }
    
    .form-input {
        padding: 12px 14px;
    }
    
    .form-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .bottom-nav-btn {
        font-size: 16px;
        min-width: 40px;
    }
}