/* ===== 极简设计系统 ===== */
:root {
    /* 苹果风格色彩 */
    --primary-blue: #007AFF;
    --success-green: #34C759;
    --warning-orange: #FF9500;
    --error-red: #FF3B30;
    
    /* 中性色 */
    --white: #FFFFFF;
    --gray-light: #F2F2F7;
    --gray-medium: #C7C7CC;
    --gray-dark: #8E8E93;
    --black: #000000;
    
    /* 文字色 */
    --text-primary: #000000;
    --text-secondary: #3C3C43;
    --text-tertiary: #8E8E93;
    
    /* 间距 */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 阴影 */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ===== 全局样式 ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--gray-light);
    margin: 0;
    padding: 0;
    line-height: 1.4;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ===== 主容器 ===== */
.main-container {
    min-height: 100vh;
    padding: var(--space-sm);
    padding-bottom: 120px; /* 为浮动按钮留空间 */
}

/* ===== 标题区域 ===== */
.header {
    margin-bottom: var(--space-xl);
    padding-top: var(--space-lg);
}

.header-content {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-sm);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.header-info {
    flex: 1;
    text-align: center;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    margin: var(--space-xs) 0 0 0;
    font-weight: 400;
}

/* ===== 登录按钮 ===== */
.login-button {
    background: linear-gradient(135deg, var(--success-green), #30D158);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
    white-space: nowrap;
    height: fit-content;
    min-width: 80px;
    justify-content: center;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.login-button:hover {
    background: linear-gradient(135deg, #30D158, var(--success-green));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52, 199, 89, 0.35);
}

.login-button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
}

.login-button i {
    font-size: 16px;
}

.login-text {
    font-size: 14px;
}

/* ===== 匿名用户提示 - 暂时隐藏 ===== */
/*
.anonymous-notice {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--warning-orange);
}

.notice-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
}

.notice-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.notice-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.notice-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notice-button:hover {
    background: #0056CC;
    transform: translateY(-1px);
}
*/

/* ===== 上传区域 ===== */
.upload-section {
    margin-bottom: var(--space-xl);
}

.upload-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-light);
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-blue), #5AC8FA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: 36px;
    color: white;
}

.upload-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.upload-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.upload-button {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-xl);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.upload-button:hover {
    background: #0056CC;
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.upload-button:active {
    transform: translateY(0);
}

/* ===== 文件列表区域 ===== */
.files-section {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-left: var(--space-xs);
}

.file-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-light);
    transition: all 0.2s ease;
}

.file-item:hover {
    box-shadow: var(--shadow-medium);
}

.file-icon {
    width: 48px;
    height: 48px;
    background: var(--success-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.file-status {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-delete {
    width: 32px;
    height: 32px;
    background: var(--error-red);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-delete:hover {
    background: #D70015;
    transform: scale(1.1);
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-tertiary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.empty-text {
    font-size: 16px;
}

/* ===== 上传进度 ===== */
.upload-progress {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-light);
}

.progress-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.progress-bar-container {
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    height: 8px;
    overflow: hidden;
    margin-bottom: var(--space-xs);
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-blue), #5AC8FA);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: var(--radius-sm);
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== 浮动按钮 ===== */
.floating-button {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--success-green), #30D158);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--space-md) var(--space-xl);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
    z-index: 1000;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.floating-button:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 12px 32px rgba(52, 199, 89, 0.4);
}

.floating-button:active {
    transform: translateX(-50%) translateY(-1px);
}

.floating-button:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    transform: translateX(-50%);
    box-shadow: var(--shadow-light);
}

/* ===== 隐藏的文件输入 ===== */
.file-input {
    display: none;
}

/* ===== 通知样式 ===== */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 90%;
}

.toast {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: slideDown 0.3s ease;
}

.toast.success { border-left: 4px solid var(--success-green); }
.toast.error { border-left: 4px solid var(--error-red); }
.toast.warning { border-left: 4px solid var(--warning-orange); }
.toast.info { border-left: 4px solid var(--primary-blue); }

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== 拖拽样式 ===== */
.upload-card.drag-over {
    background: rgba(0, 122, 255, 0.05);
    border: 2px dashed var(--primary-blue);
    transform: scale(1.02);
}

/* ===== 响应式优化 ===== */
@media (max-width: 480px) {
    .main-container {
        padding: var(--space-sm);
    }
    
    .upload-card {
        padding: var(--space-lg);
    }
    
    .upload-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
    }
    
    .upload-title {
        font-size: 20px;
    }
    
    .floating-button {
        bottom: var(--space-md);
        padding: var(--space-sm) var(--space-lg);
        font-size: 16px;
    }

    /* 匿名用户提示响应式样式 - 暂时注释
    .notice-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    */

    .header-content {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .login-button {
        padding: var(--space-xs) var(--space-sm);
        font-size: 12px;
        min-width: 70px;
        border-radius: var(--radius-md);
        position: fixed;
        top: var(--space-sm);
        right: var(--space-sm);
        z-index: 1000;
    }

    .login-button i {
        font-size: 14px;
    }

    .login-text {
        font-size: 12px;
    }
}

/* ===== 退出登录确认对话框 ===== */
.logout-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: var(--space-md);
}

.logout-dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

.logout-dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
    max-width: 400px;
    width: 100%;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.logout-dialog-overlay.show .logout-dialog {
    transform: scale(1) translateY(0);
}

.dialog-header {
    padding: var(--space-md) var(--space-md) 0 var(--space-md);
    text-align: center;
}

.dialog-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dialog-content {
    padding: var(--space-md);
    text-align: center;
}

.dialog-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 var(--space-xs) 0;
    line-height: 1.5;
}

.dialog-user {
    font-size: 14px;
    color: var(--text-tertiary);
    margin: 0;
}

.dialog-actions {
    display: flex;
    gap: var(--space-sm);
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
}

.dialog-button {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dialog-button-cancel {
    background: var(--gray-light);
    color: var(--text-primary);
}

.dialog-button-cancel:hover {
    background: var(--gray-medium);
    transform: translateY(-1px);
}

.dialog-button-confirm {
    background: var(--error-red);
    color: var(--white);
}

.dialog-button-confirm:hover {
    background: #E6342A;
    transform: translateY(-1px);
}

.dialog-button:active {
    transform: translateY(0);
}

/* 移动端对话框优化 */
@media (max-width: 480px) {
    .logout-dialog-overlay {
        padding: var(--space-sm);
    }

    .dialog-actions {
        flex-direction: column;
    }

    .dialog-button {
        padding: var(--space-md);
    }
}
