/* Common CSS for 滴滴现场看八卦 App */

/* Base Styles */
:root {
    --primary-color: #3E64FF;
    --secondary-color: #FF5E5B;
    --light-bg: #F5F7FA;
    --dark-bg: #242424;
    --text-color: #333;
    --light-text: #999;
    --border-radius: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
    padding-bottom: 65px; /* Space for bottom nav */
    padding-top: 80px; /* Space for status bar + top bar */
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* iOS Status Bar */
.ios-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
}

.status-left {
    font-weight: bold;
}

.status-center {
    position: relative;
}

.notch {
    width: 50px;
    height: 15px;
    background-color: #000;
    border-radius: 0 0 8px 8px;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.status-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* App Top Bar */
.app-top-bar {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 900;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.location-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.location-text {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    position: relative;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 900;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    position: relative;
    color: var(--light-text);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.nav-item span {
    font-size: 11px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.publish {
    margin-bottom: 15px;
}

.publish-btn {
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(62, 100, 255, 0.4);
}

.publish-btn i {
    font-size: 20px;
    margin: 0;
}

/* Badges & Notifications */
.badge {
    position: absolute;
    top: 5px;
    right: 0px;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 10px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    font-weight: bold;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 10px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
}

/* Map View and Toggle */
.view-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 10px 15px;
    padding: 8px;
    box-shadow: var(--shadow);
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    flex: 1;
    justify-content: center;
    color: var(--light-text);
}

.toggle-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

.map-view {
    position: relative;
    width: calc(100% - 30px);
    height: 200px;
    margin: 0 15px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 94, 91, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.map-marker.hot {
    background-color: rgba(255, 94, 91, 0.8);
}

.map-marker.medium {
    background-color: rgba(255, 159, 67, 0.8);
}

.map-marker.low {
    background-color: rgba(46, 204, 113, 0.8);
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    opacity: 0.6;
    animation: pulse 1.5s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    70% {
        transform: scale(2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Cards and Lists */
.hotspot-card-container {
    margin-top: 15px;
    padding: 0 15px;
}

.hotspot-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.hotspot-card.active {
    border-left: 4px solid var(--primary-color);
}

.hotspot-info {
    flex: 1;
}

.hotspot-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.hotspot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--light-text);
    margin-bottom: 6px;
}

.hotspot-desc {
    font-size: 13px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Badges */
.badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
}

.badge.hot {
    background-color: rgba(255, 94, 91, 0.1);
    color: var(--secondary-color);
}

.badge.medium {
    background-color: rgba(255, 159, 67, 0.1);
    color: #ff9f43;
}

.verified {
    color: var(--primary-color);
    margin-left: 2px;
}

/* Content Previews */
.content-preview {
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
}

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

.preview-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.text-primary {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--light-text);
}

.content-text {
    margin-bottom: 10px;
    line-height: 1.6;
}

.content-images {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.content-images img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    height: 150px;
}

.content-images.two-images img {
    width: 50%;
}

.interaction-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--light-text);
}

.interaction-btn.active {
    color: var(--primary-color);
}

.count {
    font-size: 12px;
}

/* Emotion Map */
.emotion-map {
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.refresh-btn {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: normal;
}

.emotion-map-container {
    position: relative;
    height: 180px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 10px;
}

.emotion-area {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.emotion-area.happy {
    background-color: rgba(46, 204, 113, 0.6);
    animation: pulse 2s infinite;
}

.emotion-area.excited {
    background-color: rgba(255, 94, 91, 0.6);
    animation: pulse 1.8s infinite;
}

.emotion-area.surprised {
    background-color: rgba(52, 152, 219, 0.6);
    animation: pulse 2.2s infinite;
}

.emotion-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.happy {
    background-color: rgba(46, 204, 113, 0.8);
}

.legend-color.excited {
    background-color: rgba(255, 94, 91, 0.8);
}

.legend-color.surprised {
    background-color: rgba(52, 152, 219, 0.8);
}

/* Topics */
.topics-container {
    margin: 10px 0;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.topic-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.topic-content {
    flex: 1;
}

.topic-content h3 {
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 600;
}

.topic-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--light-text);
}

/* Hotspot Content */
.hotspot-content {
    padding: 15px;
    background-color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.verified-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(62, 100, 255, 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 5px;
    gap: 3px;
}

.time {
    color: var(--light-text);
}

/* Profile Page */
.profile-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-cover {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.profile-info {
    padding: 0 15px 15px;
    text-align: center;
    margin-top: -40px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.profile-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-bio {
    color: #666;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

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

.stat-value {
    font-weight: 600;
    font-size: 16px;
}

.stat-label {
    font-size: 12px;
    color: var(--light-text);
}

/* Badge Showcase */
.badge-showcase {
    background-color: #fff;
    border-radius: var(--border-radius);
    margin: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.badges-container {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.badges-container::-webkit-scrollbar {
    display: none;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
}

.badge-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.badge-icon.verified {
    background-color: var(--primary-color);
}

.badge-icon.popular {
    background-color: var(--secondary-color);
}

.badge-icon.explorer {
    background-color: #2ecc71;
}

.badge-icon.locked {
    background-color: #bdc3c7;
}

/* Feature Menu */
.feature-menu {
    margin: 15px;
}

.menu-section {
    background-color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.menu-title {
    flex: 1;
    font-weight: 500;
}

.menu-badge {
    padding: 2px 6px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    margin-right: 10px;
}

/* Publish Form */
.location-info {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 15px;
    background-color: #fff;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.content-editor {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: none;
    resize: none;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    background-color: #fff;
}

.media-preview {
    padding: 15px;
    background-color: #fff;
}

.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.add-media-btn {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 24px;
}

.publish-options {
    background-color: #fff;
    margin-top: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.option-item i {
    width: 20px;
    margin-right: 15px;
    color: var(--light-text);
}

.toggle-switch {
    width: 50px;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    margin-left: auto;
    position: relative;
    transition: background-color 0.3s;
}

.toggle-switch.active {
    background-color: var(--primary-color);
}

.toggle-button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch.active .toggle-button {
    transform: translateX(26px);
}

.recommended-topics {
    background-color: #fff;
    padding: 15px;
    margin-top: 15px;
}

.recommended-topics h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-tag {
    padding: 6px 12px;
    background-color: var(--light-bg);
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary-color);
}

.media-toolbar {
    position: fixed;
    bottom: 65px;
    left: 0;
    width: 100%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: var(--light-text);
}

.toolbar-item i {
    font-size: 20px;
    margin-bottom: 3px;
}

.publish-action-btn {
    padding: 5px 15px;
    border-radius: 20px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.cancel-btn {
    color: var(--light-text);
}

/* Message Center */
.message-nav {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 0 15px;
    margin-bottom: 15px;
}

.message-tab {
    flex: 1;
    padding: 15px 0;
    text-align: center;
    color: var(--light-text);
    position: relative;
}

.message-tab.active {
    color: var(--primary-color);
    font-weight: 600;
}

.message-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 30%;
    width: 40%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

.message-list {
    padding: 0 15px;
}

.message-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.system-icon {
    background-color: var(--primary-color);
}

.verification-icon {
    background-color: #2ecc71;
}

.success-icon {
    background-color: #ff9f43;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.message-preview {
    font-size: 13px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 5px;
}

.message-time {
    font-size: 12px;
    color: var(--light-text);
}

.message-action {
    margin-left: 5px;
}

.btn-outline {
    padding: 5px 15px;
    border-radius: 15px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: #fff;
}