/* 全局样式与主题 */
:root {
    --bg: #0b1224;
    --panel: rgba(255, 255, 255, 0.1);
    --panel-strong: rgba(255, 255, 255, 0.16);
    --text: #e8ecf5;
    --muted: #9fb0d3;
    --primary: #6ddcff;
    --primary-2: #7f5af0;
    --accent: #22d1ee;
    --danger: #ff6b6b;
    --success: #4ade80;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    --radius: 14px;
    --input-bg: rgba(255, 255, 255, 0.12);
    --input-border: rgba(109, 220, 255, 0.32);
    --input-placeholder: #cfd8f7;
    --card: #10182f;
    --tabbar: rgba(12, 18, 32, 0.95);
    --border: rgba(255, 255, 255, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, rgba(111, 134, 214, 0.15), transparent 25%),
                radial-gradient(circle at 80% 10%, rgba(34, 209, 238, 0.18), transparent 22%),
                radial-gradient(circle at 50% 80%, rgba(255, 107, 107, 0.12), transparent 25%),
                var(--bg);
    min-height: 100vh;
    padding-bottom: 108px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    color: var(--text);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.desktop-nav {
    display: block;
}

.mobile-shell {
    display: none;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 980;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(12, 18, 32, 0.95), rgba(9, 13, 24, 0.94));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.app-topbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-brand {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.app-sub {
    font-size: 0.9rem;
    color: var(--muted);
}

.app-topbar__right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: var(--tabbar);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 0;
    border-top: 1px solid var(--border);
    z-index: 970;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 64px;
    padding: 6px 4px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.96rem;
    gap: 2px;
    transition: color 0.2s ease;
    min-width: 0;
    white-space: nowrap;
}

.tab-item.active {
    color: var(--primary);
}

.toast-stack {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(92%, 420px);
    pointer-events: none;
}

.toast {
    background: rgba(12, 18, 32, 0.95);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.35);
    border: 1px solid var(--border);
    font-weight: 600;
    letter-spacing: 0.01em;
    pointer-events: auto;
}

.toast.success { border-color: rgba(74, 222, 128, 0.6); }
.toast.error { border-color: rgba(255, 107, 107, 0.6); }
.toast.info { border-color: rgba(109, 220, 255, 0.5); }

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    transition: all 0.25s;
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #0c0f1a !important;
    box-shadow: 0 10px 28px rgba(127, 90, 240, 0.35);
    padding: 0.4rem 0.9rem !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 34px rgba(127, 90, 240, 0.45);
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary);
}

.nav-menu span {
    color: var(--muted);
}

/* 主内容区 */
main {
    min-height: calc(100vh - 180px);
    padding: 1.5rem 0 4.5rem;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 4.5rem 2rem;
    background: linear-gradient(135deg, rgba(127,90,240,0.18), rgba(109,220,255,0.18));
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    margin-bottom: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 0.01em;
}

.hero p {
    font-size: 1.15rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* 特性卡片 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.92), rgba(9, 13, 24, 0.9));
    padding: 1.75rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border 0.25s;
    border: 1px solid rgba(109, 220, 255, 0.14);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
    color: #fff;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.98rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #0c0f1a;
    box-shadow: 0 10px 30px rgba(127, 90, 240, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 36px rgba(127, 90, 240, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-success {
    background: rgba(74, 222, 128, 0.12);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.5);
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.14);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.4);
}

.btn-danger:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
}

.floating-cta {
    position: fixed;
    right: 20px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 950;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
    pointer-events: none;
}

.floating-cta .btn {
    pointer-events: auto;
    padding: 0.9rem 1.6rem;
    font-size: 1.05rem;
    box-shadow: 0 14px 36px rgba(127, 90, 240, 0.4);
}

.floating-cta .cta-hint {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* 表单样式 */
.auth-container, .create-request-container, .pending-container {
    max-width: 500px;
    margin: 2rem auto;
}

.auth-card, .pending-card {
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.94), rgba(9, 13, 24, 0.9));
    padding: 2.2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(109, 220, 255, 0.16);
}

/* Modal 基础样式 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: linear-gradient(170deg, rgba(12, 18, 32, 0.95), rgba(9, 13, 24, 0.92));
    padding: 1.8rem;
    border-radius: var(--radius);
    border: 1px solid rgba(109, 220, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    max-width: 520px;
    width: 100%;
    color: #f7f9ff;
    position: relative;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #f7f9ff;
}

.modal-content p {
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.modal .close {
    position: absolute;
    right: 12px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #9fb0d3;
}

.auth-card h2, .pending-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f2f5ff;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    border-radius: 10px;
    font-size: 1rem;
    color: #f7f9ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-group input[type="date"],
.form-group input[type="time"] {
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.3;
    height: 48px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 220, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--input-placeholder);
}

.form-group select option {
    background: #0f172a;
    color: #f7f9ff;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.eula-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

.eula-box label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
    font-weight: 600;
    color: #fff;
}

.eula-box input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.inline-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.eula-text {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* 拼车大厅 */
.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
    gap: 0.75rem;
}

.carpool-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.carpool-card {
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.92), rgba(9, 13, 24, 0.9));
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(109, 220, 255, 0.14);
}

.carpool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.carpool-header h3 {
    color: #fff;
    font-size: 1.2rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-available {
    background: rgba(34, 209, 238, 0.2);
    color: var(--primary);
}

.badge-full {
    background: rgba(255, 107, 107, 0.2);
    color: var(--danger);
}

.carpool-info p {
    margin-bottom: 0.5rem;
    color: var(--muted);
}

.carpool-members {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.carpool-members h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.carpool-members ul {
    list-style: none;
}

.carpool-members li {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.carpool-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.75rem;
}

.pagination-bar {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 1rem 0 1.4rem;
    flex-wrap: wrap;
}

.pagination-bar span {
    color: var(--muted);
    font-weight: 600;
}

.pagination-bar button {
    min-width: 88px;
}

.btn-compact {
    padding: 0.45rem 0.85rem;
    font-size: 0.95rem;
}

/* 底部筛选抽屉 */
.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    transition: bottom 0.25s ease;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
}

.sheet.active {
    bottom: 0;
    top: 0;
}

.sheet-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(170deg, rgba(12,18,32,0.96), rgba(9,13,24,0.94));
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.35);
    padding: 1.2rem;
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(90vh - env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(0);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.sheet-content.dragging {
    transition: none !important;
}

.sheet-handle {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.26);
    margin: 0 auto 0.6rem;
    touch-action: none;
}

.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sheet-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    max-height: calc(70vh - 140px);
    overflow-y: auto;
    padding-right: 2px;
}

.sheet-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .sheet-body {
        grid-template-columns: 1fr;
    }
    .sheet-footer {
        flex-direction: column;
    }
    .sheet-content {
        max-height: calc(90vh - env(safe-area-inset-bottom, 0px));
    }
    .pagination-bar {
        justify-content: center;
        width: 100%;
    }
    .pagination-bar button {
        flex: 1;
        min-width: 0;
    }
    .floating-cta {
        left: 16px;
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        align-items: center;
    }
    .floating-cta .btn {
        width: 100%;
        text-align: center;
    }
    .floating-cta .cta-hint {
        text-align: center;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .nav-menu {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.6rem;
        justify-content: flex-start;
        width: 100%;
        padding-bottom: 0.35rem;
    }
    .nav-menu li {
        display: inline-block;
    }
    .nav-menu a {
        padding: 0.3rem 0.7rem;
    }
    .logo {
        font-size: 1.15rem;
    }
    main {
        padding: 1.25rem 0 2rem;
    }
    .lobby-header {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 0.4rem;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .btn-compact {
        width: auto;
        align-self: flex-start;
    }
    .carpool-card,
    .available-pools,
    .create-request-container form,
    .tab-content,
    .carpool-list {
        padding: 1.1rem;
    }
    .carpool-card {
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .carpool-info p,
    .carpool-members li {
        font-size: 0.95rem;
    }
    .carpool-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .available-pools .form-group {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    .available-pools .form-group input,
    .available-pools .form-group select {
        width: 100%;
    }
    .inline-form {
        flex-direction: column;
    }
}

/* 创建拼车 */
.create-request-container {
    max-width: 600px;
}

.create-request-container h2 {
    margin-bottom: 2rem;
    color: #f4f6ff;
}

.create-request-container form {
    background: linear-gradient(170deg, rgba(12, 18, 32, 0.95), rgba(9, 13, 24, 0.92));
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(109, 220, 255, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.create-request-container .btn {
    margin-top: 0.4rem;
}

.available-pools {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.92), rgba(9, 13, 24, 0.9));
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(109, 220, 255, 0.16);
}

.available-pools h3 {
    margin-bottom: 1rem;
    color: #f4f6ff;
}

.pool-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(109, 220, 255, 0.12);
}

.pool-item p {
    margin-bottom: 0.5rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.carpool-pending {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fff8e1;
    border-radius: 6px;
    color: #8d6e00;
}

/* 管理员后台 */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-container h2 {
    margin-bottom: 2rem;
    color: #f4f6ff;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.25s;
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #0c0f1a;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(127, 90, 240, 0.35);
}

.tab-content {
    display: none;
    background: linear-gradient(160deg, rgba(12, 18, 32, 0.92), rgba(9, 13, 24, 0.9));
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(109, 220, 255, 0.16);
}

.tab-content.active {
    display: block;
}

.data-table .btn-danger,
.data-table .btn-success {
    padding: 0.35rem 0.9rem;
}

.inline-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.inline-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #fff;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.data-table button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 等待审核页面 */
.pending-container {
    text-align: center;
}

.pending-card {
    padding: 3rem 2rem;
}

.pending-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.pending-card p {
    color: #b8c4d9;
    margin-bottom: 1rem;
}

/* 消息提示 */
.no-data, .error {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error {
    color: #e74c3c;
}

/* 页脚 */
footer {
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    body {
        padding-bottom: 112px; /* 预留底部 TabBar 与安全区 */
    }
    footer {
        padding-bottom: 2.6rem;
    }
    .desktop-nav {
        display: none;
    }
    .mobile-shell {
        display: block;
    }
    .tabbar {
        flex-wrap: nowrap;
    }
}

/* 强制底部 Tab 横向排列，兼容极端窄屏 */
@media (max-width: 420px) {
    .tabbar {
        display: flex;
        flex-direction: row;
    }
    .tab-item {
        font-size: 0.9rem;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.6rem;
        justify-content: flex-end;
    }
    .nav-menu a {
        padding: 0.3rem 0.7rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .carpool-list {
        grid-template-columns: 1fr;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .inline-form {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    body {
        padding: 0 8px;
    }
    main {
        padding: 1.5rem 0 2rem;
        min-height: calc(100vh - 140px);
    }
    .auth-card, .pending-card, .create-request-container form, .available-pools, .carpool-card, .tab-content {
        padding: 1.25rem;
    }
    .hero {
        padding: 3rem 1.25rem;
    }
    .hero h1 {
        font-size: 1.75rem;
    }
    .carpool-list {
        grid-template-columns: 1fr;
    }
    .carpool-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .carpool-actions .btn {
        width: 100%;
        text-align: center;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.7rem 0.85rem;
    }
    .inline-form input {
        width: 100%;
    }
    .modal-content {
        max-width: 95%;
        padding: 1.2rem;
    }
    .lobby-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .hero-buttons {
        flex-direction: column;
    }
}
