/* JUST PRO综合运动馆OA系统 - 样式表 */

/* ==================== 变量定义 ==================== */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #0f3460;
    --highlight: #e94560;
    --success: #00d9a5;
    --error: #ff4757;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --border-color: #e1e5eb;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease-out;
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8ecf1 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input {
    font-family: inherit;
    outline: none;
    border: none;
}

/* ==================== 容器布局 ==================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .container {
        padding: 40px 24px 60px;
    }
}

/* ==================== 页面头部 ==================== */
.header {
    text-align: center;
    padding: 40px 0 32px;
}

@media (min-width: 768px) {
    .header {
        padding: 60px 0 48px;
    }
}

.logo {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.logo svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 2px;
}

@media (min-width: 768px) {
    .header h1 {
        font-size: 1.75rem;
    }
}

.header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ==================== 导航卡片 ==================== */
.nav-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--highlight);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-card:hover::before {
    transform: scaleY(1);
}

.nav-card:active {
    transform: scale(0.98);
}

.nav-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon.payment {
    background: linear-gradient(135deg, #e94560 0%, #ff6b81 100%);
}

.nav-icon.settings {
    background: linear-gradient(135deg, #0f3460 0%, #1a5276 100%);
}

.nav-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.nav-content {
    flex: 1;
}

.nav-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.nav-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-arrow {
    width: 24px;
    height: 24px;
    fill: var(--text-secondary);
    opacity: 0.5;
    transition: opacity var(--transition-fast);
}

.nav-card:hover .nav-arrow {
    opacity: 1;
}

/* ==================== 页面导航栏 ==================== */
.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 24px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: var(--primary);
}

.back-btn:hover svg {
    fill: white;
}

.back-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
    transition: fill var(--transition-fast);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* ==================== 设置表单 ==================== */
.settings-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-item {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.settings-label span {
    color: var(--highlight);
}

.settings-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.settings-input:focus {
    background: var(--bg-white);
    border-color: var(--accent);
}

.settings-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.settings-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ==================== 按钮 ==================== */
.btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--highlight) 0%, #ff6b81 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(233, 69, 96, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-block {
    margin-top: 24px;
}

/* ==================== 支付卡片 ==================== */
.payment-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 24px;
}

.payment-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e94560 0%, #ff6b81 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.payment-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.payment-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: "DIN Alternate", "Helvetica Neue", monospace;
}

.payment-amount span {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.payment-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.payment-info {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 24px;
    text-align: left;
}

.payment-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
}

.payment-info-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.payment-info-label {
    color: var(--text-secondary);
}

.payment-info-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== Toast 提示 ==================== */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    z-index: 9999;
    opacity: 0;
    transition: all var(--transition-slow);
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--error);
}

.toast.info {
    background: var(--accent);
}

/* ==================== 加载状态 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--highlight);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ==================== 页脚 ==================== */
.footer {
    text-align: center;
    padding: 32px 0 16px;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.icp-record {
    margin-top: 8px;
}

.icp-record a {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: color var(--transition-fast);
}

.icp-record a:hover {
    color: var(--accent);
}

/* ==================== 动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-slow) forwards;
}

.fade-in-delay-1 {
    animation-delay: 100ms;
    opacity: 0;
}

.fade-in-delay-2 {
    animation-delay: 200ms;
    opacity: 0;
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==================== 密码验证遮罩 ==================== */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.password-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.password-dialog {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px 32px 32px;
    width: 320px;
    max-width: 90vw;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: passwordSlideIn 0.35s ease-out;
}

@keyframes passwordSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes passwordShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.password-dialog.shake {
    animation: passwordShake 0.45s ease;
}

.password-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f3460 0%, #1a5276 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.password-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.password-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
}

.password-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.password-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    text-align: center;
    letter-spacing: 4px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    -webkit-text-security: disc;
}

.password-input:focus {
    background: var(--bg-white);
    border-color: var(--accent);
}

.password-input.error-border {
    border-color: var(--error);
    background: #fff5f5;
}

.password-error {
    font-size: 0.8125rem;
    color: var(--error);
    min-height: 20px;
    margin-top: 8px;
    transition: all 0.2s;
}

.password-dialog .btn {
    margin-top: 20px;
}

/* ==================== 响应式调整 ==================== */
@media (max-width: 375px) {
    .nav-card {
        padding: 20px;
    }
    
    .nav-icon {
        width: 48px;
        height: 48px;
    }
    
    .nav-icon svg {
        width: 24px;
        height: 24px;
    }
}
