/* 盲盒交友系统 - 移动端优先设计 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.65);
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-hover: rgba(255, 255, 255, 0.22);
    --border: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius: 20px;
    --radius-lg: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-white);
    line-height: 1.6;
    padding-bottom: 80px;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 布局容器 ========== */
.page-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px 20px;
}

/* ========== 顶部标题 ========== */
.app-header {
    padding: max(28px, env(safe-area-inset-top)) 0 32px;
    text-align: center;
}

.app-logo {
    font-size: 72px;
    margin-bottom: 12px;
    line-height: 1;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.app-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-header {
    padding: max(28px, env(safe-area-inset-top)) 0 28px;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== 统计卡片 ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    padding: 18px 12px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.stat-item:active {
    transform: scale(0.95);
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ========== 盲盒卡片 ========== */
.blindbox-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.blindbox-card:active {
    transform: scale(0.97);
    background: var(--card-hover);
}

.box-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.box-emoji {
    font-size: 64px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.box-info {
    flex: 1;
}

.box-info h3 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.box-count {
    font-size: 15px;
    color: var(--text-light);
}

.box-count .number {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-white);
}

.box-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== 使用说明 ========== */
.guide-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.guide-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 15px;
    color: var(--text-light);
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

/* ========== 订单卡片 ========== */
.order-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.order-type {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
}

.order-type span:first-child {
    font-size: 32px;
}

.order-badge {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.order-info {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.9;
}

.order-info > div {
    margin-bottom: 6px;
}

.order-actions {
    margin-top: 18px;
}

/* ========== 个人中心 ========== */
.profile-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.profile-avatar {
    width: 88px;
    height: 88px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    margin: 0 auto 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.profile-phone {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.profile-status {
    font-size: 14px;
    color: var(--text-light);
}

.menu-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 20px 22px;
    color: var(--text-white);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    font-size: 28px;
    width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.menu-content {
    flex: 1;
    margin-left: 14px;
}

.menu-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.menu-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.menu-arrow {
    color: var(--text-muted);
    font-size: 22px;
    font-weight: 300;
}

/* ========== 按钮 ========== */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.85);
}

.btn-white {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-white:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.85);
}

.btn-success {
    background: rgba(255, 255, 255, 0.95);
    color: #10b981;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-success:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.85);
}

.btn-block {
    width: 100%;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 88px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item.active {
    color: var(--text-white);
    transform: scale(1.08);
}

.nav-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.nav-label {
    font-size: 11px;
    font-weight: 700;
}

/* ========== 客服按钮 ========== */
.fab {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:active {
    transform: scale(0.9);
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    color: #6b7280;
    transition: all 0.2s;
}

.modal-close:active {
    transform: scale(0.9);
    background: #e5e7eb;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    color: #1f2937;
}

/* ========== 登录页 ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    padding: 44px 32px;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    font-size: 80px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.login-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 44px;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    transition: all 0.3s;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

.checkbox-group a {
    color: var(--text-white);
    text-decoration: underline;
    font-weight: 600;
}

/* ========== 提示 ========== */
.alert {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 22px;
    font-size: 14px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--text-white);
}

/* ========== 响应式 ========== */
@media (min-width: 768px) {
    .page-container {
        max-width: 600px;
    }
    
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 24px 24px 0 0;
    }
    
    .fab {
        right: calc(50% - 280px);
    }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}


/* ========== 弹窗样式 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 90%;
    width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-white);
    border: 1px solid var(--border);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-white);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 弹窗内容滚动条样式 */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}


/* ========== 按钮样式 ========== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-white {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
