:root {
    --bg-primary: #0a0b0d;
    --bg-card: rgba(20, 22, 26, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --primary-color: #ff9f1c; /* 芒果色 */
    --primary: #ff9f1c;
    --secondary: #42d7c8;
    --accent-pink: #ef4f97;
    --accent-green: #73e64a;
    --primary-gradient: linear-gradient(135deg, #ff9f1c 0%, #ff5e62 100%);
    --brand-gradient: linear-gradient(135deg, #ffdd3c 0%, #ff9f1c 34%, #42d7c8 68%, #ef4f97 100%);
    --card-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    overflow-x: hidden;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 159, 28, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 94, 98, 0.08) 0%, transparent 45%);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 自动补全下拉框 */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(144, 107, 255, 0.15);
}

.ac-avatar {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    image-rendering: pixelated;
}

.ac-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ac-name {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.ac-id {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-family: monospace;
}

.ac-empty {
    padding: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 现代输入框与按钮 */
.modern-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.2);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 159, 28, 0.4);
    filter: brightness(1.1);
}

.primary-btn:active {
    transform: translateY(1px);
}

/* ==========================================
   响应式适配 (Media Queries)
   ========================================== */

/* ==========================================
   登录页面样式
   ========================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    padding: 36px;
    box-shadow: var(--card-glow);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-gradient);
}

.brand-logo {
    width: 98px;
    height: 72px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite alternate;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(255, 159, 28, 0.22));
}

.brand-kicker {
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 8px;
}

h1.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.brand-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 18px;
    padding: 6px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.login-tab {
    min-height: 48px;
    padding: 8px 10px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    transition: all 0.25s ease;
}

.login-tab span {
    display: block;
    margin-top: 2px;
    color: inherit;
    opacity: 0.68;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.login-tab.active {
    color: #111318;
    background: linear-gradient(135deg, #ffdd3c, #ff9f1c);
    box-shadow: 0 8px 20px rgba(255, 159, 28, 0.2);
}

.login-guide {
    margin-bottom: 18px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(255, 221, 60, 0.08), rgba(66, 215, 200, 0.05));
    border: 1px solid rgba(255, 221, 60, 0.18);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: left;
}

.login-guide strong {
    color: #ffdd3c;
}

.form-group {
    text-align: left;
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
    user-select: none;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px 14px 115px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 159, 28, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.btn-submit {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(255, 159, 28, 0.3);
}

.btn-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* 确认等待状态 */
.loading-view {
    display: none;
    padding: 10px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 159, 28, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================
   主控制面板样式
   ========================================== */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: rgba(15, 17, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
}

.sidebar-header {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-logo {
    font-size: 1.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.menu-item.active a, .menu-item a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active a {
    background: rgba(255, 159, 28, 0.1);
    color: var(--primary-color);
}

.menu-item.coming-soon a {
    opacity: 0.5;
    cursor: not-allowed;
}

.badge-soon {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    color: #ef4444;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

/* 主展示区域 */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px;
    max-width: 1200px;
}

/* 顶部状态栏 */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.welcome-msg h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.welcome-msg p {
    color: var(--text-secondary);
    margin-top: 4px;
}

.player-status-badge {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

/* 信息展示容器 */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ==========================================
   各区域子卡片布局
   ========================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.passport-hero-card {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(20, 22, 26, 0.8) 0%, rgba(10, 11, 13, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    box-shadow: var(--card-glow);
    position: relative;
    overflow: hidden;
}

.passport-hero-card::before {
    content: '';
    position: absolute;
    right: 28px;
    top: 24px;
    width: 128px;
    height: 92px;
    background: url('mangocraft-logo.png') center / contain no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

@media (max-width: 768px) {
    /* (内容已移至 1024px) */
}

.passport-hero-card::after {
    content: 'MANGOCRAFT';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 7rem;
    font-weight: 950;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--primary-color);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.hero-details {
    flex-grow: 1;
}

.hero-name {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.hero-id {
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--primary-color);
    background: rgba(255, 159, 28, 0.1);
    border: 1px solid rgba(255, 159, 28, 0.16);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 12px;
    font-weight: 800;
}

.hero-signature {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    padding-left: 12px;
    margin-top: 5px;
}

.grid-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-glow);
}

.card,
.grid-card {
    position: relative;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

.card-title i {
    color: var(--primary-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    font-weight: 600;
    word-break: break-word;
    text-align: right;
    max-width: 60%;
}

.admin-edit-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 6px;
    margin-left: 6px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.admin-edit-btn:hover {
    opacity: 1;
}

.info-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 印戳卡 */
.stamps-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.stamp-badge {
    background: rgba(255, 94, 98, 0.08);
    border: 1px dashed rgba(255, 94, 98, 0.3);
    color: #ff5e62;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    transform: rotate(-3deg);
    display: inline-block;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

/* 资产及存款 */
.balance-card {
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.15) 0%, rgba(255, 94, 98, 0.15) 100%);
    border: 1px solid rgba(255, 159, 28, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    text-align: center;
}

.balance-amount {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 5px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.balance-unit {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

/* 表格公用样式 */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-weight: 600;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* 死亡列表特定 */
.death-coord {
    font-family: monospace;
    background: rgba(255,255,255,0.05);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.death-msg {
    color: #ef4444;
    font-weight: 500;
}

/* 领地特定 */
.res-lease-tax {
    color: var(--primary-color);
    font-weight: 700;
}

/* 提示信息 */
.empty-placeholder {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.empty-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* ==========================================
   动画定义
   ========================================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { filter: drop-shadow(0 0 2px rgba(255, 159, 28, 0.4)); }
    100% { filter: drop-shadow(0 0 10px rgba(255, 159, 28, 0.8)); }
}

@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 消息提示框 */
.alert-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #ef4444;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   侧边栏名片扩展与毛玻璃样式
   ========================================== */
.sidebar {
    padding: 20px;
    overflow-y: auto;
}

.sidebar-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 16px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand img {
    width: 52px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(255, 159, 28, 0.18));
}

.sidebar-brand-name {
    color: var(--text-primary);
    font-size: 0.98rem;
    font-weight: 900;
    line-height: 1.1;
}

.sidebar-brand-sub {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.skin-container {
    width: 100%;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.skin-container::before {
    content: 'CITIZEN ID';
    position: absolute;
    top: 12px;
    left: 14px;
    color: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.skin-container img {
    height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.6));
    transition: transform 0.3s ease;
    image-rendering: auto;
}

.skin-container:hover img {
    transform: scale(1.05);
}

.profile-details-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.p-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.p-val {
    font-weight: 700;
    color: var(--text-primary);
}


.profile-sub-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    align-self: flex-start;
    width: 100%;
    border-left: 3px solid var(--primary-color);
    padding-left: 8px;
}

/* 名称历史 */
.name-history-container {
    width: 100%;
    margin-bottom: 20px;
}

.name-history-list {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.name-history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 0.85rem;
}

.name-history-item:last-child {
    border-bottom: none;
}

.nh-name {
    font-weight: 600;
    color: var(--text-primary);
}

.nh-date {
    color: var(--text-muted);
}

/* 采矿图表 */
.mining-chart-container {
    width: 100%;
    margin-bottom: 10px;
}

.mining-bar-wrapper {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.mining-bar {
    display: flex;
    width: 100%;
    height: 100%;
}

.mining-segment {
    height: 100%;
    transition: width 0.5s ease;
    cursor: pointer;
    position: relative;
}

.mining-segment:hover {
    filter: brightness(1.2);
    transform: scaleY(1.1);
    z-index: 1;
}

.mining-tooltip {
    margin-top: 8px;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 顶部导航选项卡 */
.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 14px;
}

.nav-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.nav-tab span:not(.badge-soon) {
    color: inherit;
    opacity: 0.58;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
    background: linear-gradient(135deg, #ffdd3c, #ff9f1c);
    color: #111318;
    box-shadow: 0 4px 12px rgba(255, 159, 28, 0.2);
}

/* 覆盖原本 main-content 宽度以防止被名片挤开 */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    padding: 40px;
    max-width: calc(100% - 280px);
}

/* ==========================================
   进度与成就面板样式
   ========================================== */
.adv-tab-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
    flex-wrap: wrap;
}

.adv-tab-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.adv-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.adv-tab-btn.active {
    background: rgba(255, 159, 28, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 进度条 */
.adv-progress-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.adv-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.adv-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.adv-progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 成就网格 */
.advancements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 4px;
}

/* 成就卡片 */
.adv-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.adv-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
}

/* 已完成状态 */
.adv-card.completed {
    border-color: rgba(255, 159, 28, 0.3);
    background: rgba(255, 159, 28, 0.03);
    box-shadow: 0 4px 12px rgba(255, 159, 28, 0.05);
}

.adv-card.completed::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 159, 28, 0.3) 50%);
}

/* 未完成状态 */
.adv-card.locked {
    opacity: 0.55;
    border-style: dashed;
}

.adv-icon-box {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #5c3e21; /* 经典Minecraft成就黄框 */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
}

.adv-card.completed .adv-icon-box {
    border-color: #ff9f1c;
}

.adv-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
}

.adv-card.locked .adv-icon {
    filter: grayscale(1) brightness(0.6);
}

.adv-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.adv-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.adv-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adv-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==========================================
   Responsive Design / 响应式布局
   ========================================== */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
    }

    .profile-card {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 20px;
        justify-content: center;
        align-items: flex-start;
    }

    .skin-container {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }

    .profile-details-list, .name-history-container, .mining-chart-container {
        flex: 1 1 280px;
        min-width: 280px;
    }

    .sidebar-footer {
        width: 100%;
        border-top: none;
        padding-top: 20px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 20px;
    }

    .welcome-msg {
        width: 100%;
    }

    .welcome-msg h2 {
        font-size: 1.5rem;
        word-break: break-word;
    }

    .nav-tabs {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
    }

    .nav-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .nav-tabs::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
    
    .nav-tabs::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 4px;
    }

    .nav-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .nav-tab span:not(.badge-soon) {
        display: none;
    }

    .card-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .passport-hero-card {
        grid-column: span 1 !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    .advancements-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .passport-hero-card {
        padding: 20px;
    }
    
    .avatar-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .balance-amount {
        font-size: 2.5rem;
    }
}

/* ==========================================
   模态框通用样式
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--card-glow), 0 0 40px rgba(255, 159, 28, 0.08);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.form-group {
    margin-bottom: 16px;
}
