/* CSS Variables */
:root {
    --bg: #07110f;
    --card: #0d1b18;
    --card2: #102320;
    --text: #ecfdf5;
    --muted: #9db7ae;
    --line: #21433d;
    --accent: #34d399;
    --accent2: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #06100e, #0b1715 40%, #07110f);
    color: var(--text);
    padding: 24px;
    min-height: 100vh;
    line-height: 1.6;
}

/* Layout */
.wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 0;
}

.loading-text {
    font-size: 18px;
    color: var(--accent);
}

/* Header */
.hero {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 18px;
    margin-bottom: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(52, 211, 153, 0.16);
    font-size: 24px;
}

.brand-title {
    font-size: 28px;
    font-weight: 900;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 14px;
}

h1 {
    font-size: 42px;
    line-height: 1.1;
    margin: 0 0 12px;
}

h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

/* Cards */
.card {
    background: rgba(13, 27, 24, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-main {
    padding: 28px;
}

.side {
    padding: 22px;
}

.panel {
    padding: 22px;
}

/* Typography */
.note {
    color: var(--muted);
    line-height: 1.8;
}

.muted {
    color: var(--muted);
}

.highlight {
    color: #83f0c2;
    font-weight: 800;
}

.text-center {
    text-align: center;
}

/* Buttons */
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.btn,
button {
    border: none;
    cursor: pointer;
    border-radius: 16px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #042a1d;
}

.btn-primary:hover {
    background: var(--accent2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #11211e;
    color: var(--text);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    background: #162c28;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Chips */
.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: #0a1513;
    border-radius: 999px;
    color: #cdece0;
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

/* Tabs */
.tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 8px;
    background: rgba(13, 27, 24, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    margin-bottom: 18px;
}

.tab {
    background: #091412;
    color: #d6f6ea;
    border: 1px solid #14342d;
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 14px;
}

.tab:hover {
    background: #10201c;
}

.tab.active {
    background: var(--accent);
    color: #042a1d;
    border-color: var(--accent);
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 18px;
}

.discover-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.record-grid {
    grid-template-columns: 0.9fr 1.1fr;
}

.pomodoro-grid {
    grid-template-columns: 0.95fr 1.05fr;
}

.detail-hero {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 18px;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: #081210;
    color: var(--text);
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.2);
}

.search {
    max-width: 360px;
    flex: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.form-control {
    max-width: 200px;
    margin: 0 auto;
}

/* Time Switch */
.time-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.time-btn {
    background: #0a1513;
    color: #e7fff5;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 14px;
}

.time-btn:hover {
    background: #10201c;
}

.time-btn.active {
    background: var(--accent);
    color: #052719;
    border-color: var(--accent);
}

/* Cafe List */
.cafe-list {
    display: grid;
    gap: 14px;
}

.cafe {
    display: grid;
    grid-template-columns: 220px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #081210;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cafe:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cafe img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cafe-body {
    padding: 18px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

/* Score */
.score {
    min-width: 70px;
    text-align: center;
    background: var(--accent);
    color: #052719;
    font-size: 26px;
    font-weight: 900;
    border-radius: 18px;
    padding: 10px 14px;
}

.score.empty {
    background: #11211e;
    color: var(--muted);
    font-size: 14px;
}

.meta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
    grid-auto-rows: minmax(80px, auto);
    grid-template-rows: repeat(3, minmax(80px, auto));
}

.metric {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #0b1614;
}

.metric .k {
    font-size: 12px;
    color: var(--muted);
}

.metric .v {
    font-size: 18px;
    font-weight: 800;
    margin-top: 4px;
}

/* Map */
.map-box {
    height: 520px;
    border: 1px solid var(--line);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

#amapContainer {
    width: 100%;
    height: 100%;
}

.map-tip {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: rgba(9, 20, 18, 0.95);
    border-radius: 16px;
    color: var(--muted);
    font-size: 14px;
    z-index: 10;
}

/* Detail Page */
.detail-cover {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detail-cover:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
}

.detail-title {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
}

#detailName {
    font-size: 32px;
    font-weight: 900;
}

.detail-score {
    background: var(--accent);
    color: #052719;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 34px;
    font-weight: 900;
}

/* Chart Bars */
.chart-bars {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    height: 200px;
    padding: 14px 8px 0;
    margin-top: 10px;
}

.bar-wrap {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.bar {
    width: 60%;
    max-width: 80px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, var(--accent), var(--accent2));
    min-height: 4px;
    transition: height 0.5s ease, opacity 0.3s ease;
    box-shadow: 0 -4px 12px rgba(52, 211, 153, 0.3);
}

.bar:hover {
    filter: brightness(1.1);
}

.bar-label {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.bar-value {
    margin-top: 4px;
    font-weight: 800;
    font-size: 16px;
    color: var(--text);
}

/* Review */
.review {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #091412;
    color: #d8f5eb;
    line-height: 1.8;
    margin-top: 12px;
}

/* Record Page */
.drop {
    border: 1px dashed #2a6b59;
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    background: #081210;
    transition: all 0.2s ease;
}

.drop:hover {
    border-color: var(--accent);
    background: #0a1513;
}

.drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.record-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.record-status {
    margin-top: 12px;
    color: var(--accent);
    font-weight: 700;
}

.record-timer {
    font-size: 20px;
    margin-top: 8px;
    color: var(--text);
}

/* Pomodoro */
.timer-container {
    margin: 10px auto 0;
    max-width: 400px;
}

.timer-disc {
    width: 280px;
    height: 280px;
    border-radius: 999px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    border: 1px solid #2a6b59;
    background: rgba(52, 211, 153, 0.12);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.timer-center {
    position: relative;
    z-index: 3;
    text-align: center;
}

.timer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: conic-gradient(var(--accent) 0deg, transparent 0deg);
    opacity: 0.2;
    z-index: 1;
    transition: background 0.3s ease;
}

.timer-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 120px;
    background: var(--accent);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
    z-index: 2;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.timer-hand::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.timer-display {
    font-size: 48px;
    font-weight: 900;
}

.timer-controls {
    margin-top: 20px;
    padding: 0 20px;
}

.time-value {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent);
}

.time-slider {
    position: relative;
    margin: 20px 0;
}

.time-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #1a3a33;
    outline: none;
    -webkit-appearance: none;
}

.time-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
}

.time-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
    border: none;
}

.time-markers {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
}

.time-markers span {
    position: relative;
}

.time-markers span::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: var(--muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
    .hero,
    .discover-grid,
    .detail-hero,
    .record-grid,
    .pomodoro-grid {
        grid-template-columns: 1fr;
    }

    .cafe {
        grid-template-columns: 1fr;
    }

    .cafe img {
        height: 180px;
    }

    .tabs {
        grid-template-columns: repeat(3, 1fr);
    }

    .map-box {
        height: 400px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    h1 {
        font-size: 32px;
    }

    .tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics {
        grid-template-columns: 1fr 1fr;
    }

    .map-box {
        height: 300px;
    }

    .timer-disc {
        width: 220px;
        height: 220px;
    }

    .timer-display {
        font-size: 36px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search {
        max-width: 100%;
    }

    .time-switch {
        justify-content: center;
    }

    .detail-title {
        flex-direction: column;
        align-items: flex-start;
    }

    #detailName {
        font-size: 24px;
    }

    .detail-score {
        font-size: 24px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.screen.active {
    animation: fadeIn 0.3s ease;
}

/* Focus styles for accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* User Profile Card */
.user-profile-card {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 16px 20px;
}

.user-profile-card:hover {
    background: var(--card2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: #0f172a;
    flex-shrink: 0;
}

.user-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text);
}

.user-stats-mini {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}

.user-stats-mini span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-stats-mini span span {
    color: var(--accent);
    font-weight: 600;
}

/* Header Right Section */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Stress Relief Button - 绿色圆形设计 */
.stress-relief-btn {
    flex: 0 0 64px;
    padding: 0;
    touch-action: manipulation;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34d399, #10b981);
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.stress-relief-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(52, 211, 153, 0.5);
}

.stress-relief-btn:active {
    transform: scale(0.92);
}

.stress-btn-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stress-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 2px;
}

.stress-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

.stress-count {
    font-size: 14px;
    font-weight: 800;
}

.stress-speed {
    font-size: 9px;
    opacity: 0.9;
}

/* Sound Wave Animation */
@keyframes soundWave {
    0%, 100% {
        transform: scaleY(0.3);
        opacity: 0.5;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(74, 222, 128, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* 全屏容器裁切溢出，圆环仅通过 transform 动画扩散。 */
.stress-wave-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 900;
    contain: strict;
}

.stress-wave {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(52, 211, 153, 0.8);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
    animation: stressWaveExpand 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
    will-change: transform, opacity;
}

.stress-wave:nth-child(2) { animation-delay: 0.12s; }

@keyframes stressWaveExpand {
    from { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    to { transform: translate(-50%, -50%) scale(9); opacity: 0; }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.modal-body {
    min-height: 200px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--accent2);
}

/* User Page */
.user-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.tape-container {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.tape {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 420px;
    padding: 15px 20px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
}

.tape::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* 波轮样式 - 更拟真 */
.tape-reel {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, #555, #222),
        repeating-conic-gradient(from 0deg, #333 0deg 10deg, #444 10deg 20deg);
    border: 3px solid #1a1a1a;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.5),
        inset 0 1px 2px rgba(255,255,255,0.1);
    position: relative;
    animation: tapeReelRotate 3s linear infinite;
}

.tape-reel.left {
    animation-direction: normal;
}

.tape-reel.right {
    animation-direction: reverse;
}

@keyframes tapeReelRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 波轮中心轴 */
.tape-reel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #888, #444);
    border: 2px solid #222;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
}

/* 波轮齿孔 */
.tape-reel::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: 
        repeating-conic-gradient(from 0deg, transparent 0deg 25deg, rgba(0,0,0,0.3) 25deg 30deg);
    z-index: 1;
}

/* 磁带主体 */
.tape-content {
    flex: 1;
    height: 55px;
    background: linear-gradient(180deg, #e8e0d0 0%, #d0c8b8 50%, #c0b8a8 100%);
    border-radius: 4px;
    position: relative;
    margin: 0 12px;
    box-shadow: 
        inset 0 1px 3px rgba(255,255,255,0.5),
        inset 0 -1px 3px rgba(0,0,0,0.1),
        0 2px 4px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* 磁带窗口 */
.tape-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 75%;
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 磁带数值 */
.tape-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(52, 211, 153, 0.6);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

#userInfo {
    color: var(--accent);
    font-weight: 600;
}

/* Selection */
::selection {
    background: rgba(52, 211, 153, 0.3);
    color: var(--text);
}

/* 访客模式覆盖层 */
.guest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.guest-overlay-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
    background: rgba(26, 32, 44, 0.8);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.guest-overlay h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.guest-overlay p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.guest-overlay .btn {
    min-width: 150px;
    position: relative;
    z-index: 1001;
}

/* 毛玻璃覆盖层的容器需要相对定位 */
#userTabContent {
    position: relative;
}

/* 保持原有配色，改善信息密度与窄屏阅读。 */
.hero, .grid, .detail-hero { min-width: 0; }
.hero > *, .grid > *, .cafe-body { min-width: 0; }
.hero-main { background: radial-gradient(ellipse at top right, #143d30 0, transparent 65%), var(--card); }
.hero-main h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.3; }
.header-right-section { justify-content: center; }
.user-profile-card { flex: 1; min-width: 0; }
.user-info { min-width: 0; }
.user-info h3, .cafe h3 { overflow-wrap: anywhere; }
.user-stats-mini { flex-wrap: wrap; gap: 4px 12px; }
.cafe .row { align-items: flex-start; gap: 12px; }
.cafe .score { flex-shrink: 0; }
.cafe img { background: var(--card2); }
.cafe .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric .v { overflow-wrap: anywhere; }
audio { width: 100%; max-width: 100%; }
.modal-content { max-height: calc(100dvh - 32px); overflow-y: auto; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
#amapContainer { color: var(--muted); }
@media (min-width: 901px) {
    .discover-grid { grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.8fr); }
}
@media (max-width: 640px) {
    body { padding: 12px; }
    .hero-main, .panel { padding: 20px; }
    .card { border-radius: 20px; }
    .header-right-section { gap: 12px; }
    .tabs { display: flex; overflow-x: auto; border-radius: 18px; }
    .tab { flex: 0 0 auto; white-space: nowrap; padding: 10px 16px; }
    .cafe { padding: 12px; }
    .user-profile-card { padding: 14px; }
    .user-profile-header { gap: 8px; }
    .user-avatar { width: 36px; height: 36px; }
    .button-row { gap: 8px; }
    .map-tip { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .stress-wave-container { display: none !important; }
}
