/* 社交页面样式 */

/* 模式切换标签 */
.social-tabs {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.social-tabs .container {
    display: flex;
    gap: 16px;
}

.social-tab {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.social-tab.active {
    background: white;
    border-color: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 社交页面容器 */
.social-page {
    display: none;
}

.social-page.active {
    display: block;
}

/* 地图模式 */
.map-mode {
    height: calc(100vh - 64px - 53px);
    display: flex;
    position: relative;
}

#map {
    flex: 1;
    height: 100%;
    z-index: 1;
    border-radius: 20px;
    margin: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 0 0 4px rgba(255, 255, 255, 0.5);
}

/* 卡通地图标记动画 */
@keyframes marker-wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* 侧边面板 */
.side-panel {
    width: 360px;
    background: white;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.panel-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header i {
    color: var(--primary-color);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.location-info i {
    color: var(--accent-color);
}

.filters {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.filters select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.user-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    transition: var(--transition);
    border: 2px solid transparent;
}

.user-card:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0044B8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    margin-bottom: 12px;
    position: relative;
}

.user-avatar.female {
    background: linear-gradient(135deg, #E91E63 0%, #C2185B 100%);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--secondary-color);
    border: 2px solid white;
    border-radius: 50%;
}

.user-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.user-skill {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-skill i {
    color: var(--primary-color);
}

.user-location {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.user-tags .tag {
    background: white;
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
}

.btn-greet {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-greet:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.online-count {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.online-count i {
    color: var(--secondary-color);
    font-size: 10px;
    animation: pulse 2s infinite;
}

/* 聊天窗口 */
.chat-window {
    position: fixed;
    bottom: 24px;
    right: 400px;
    width: 320px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 100;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar.small {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.btn-close-chat {
    color: white;
    font-size: 18px;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
}

.message {
    margin-bottom: 12px;
    max-width: 80%;
}

.message.received {
    margin-right: auto;
}

.message.sent {
    margin-left: auto;
}

.message p {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
}

.message.received p {
    background: white;
}

.message.sent p {
    background: var(--primary-color);
    color: white;
}

.message .time {
    font-size: 11px;
    color: var(--text-tertiary);
    display: block;
    margin-top: 4px;
}

.chat-input {
    padding: 12px;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.chat-input button {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
}

/* 漂流瓶模式 */
.bottle-mode {
    min-height: calc(100vh - 64px - 53px);
    background: linear-gradient(180deg, #1C2435 0%, #2D3E50 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.bottle-header {
    text-align: center;
    color: white;
    margin-bottom: 48px;
}

.bottle-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.bottle-header p {
    font-size: 16px;
    opacity: 0.8;
}

.bottle-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* 海洋动画 */
.ocean-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.1;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 200%;
    height: 200px;
    background: linear-gradient(90deg, #0052D9, #00A870, #0052D9);
    border-radius: 50%;
    animation: wave 8s linear infinite;
    transform: translateX(-50%);
}

.wave:nth-child(2) {
    bottom: 10px;
    opacity: 0.5;
    animation-delay: -2s;
    animation-duration: 10s;
}

.wave:nth-child(3) {
    bottom: 20px;
    opacity: 0.3;
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes wave {
    0% {
        transform: translateX(-50%) translateY(0) rotate(0deg);
    }
    50% {
        transform: translateX(-50%) translateY(-20px) rotate(180deg);
    }
    100% {
        transform: translateX(-50%) translateY(0) rotate(360deg);
    }
}

/* 漂流瓶视觉 */
.bottle-visual {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.bottle-visual i {
    font-size: 120px;
    color: rgba(255, 255, 255, 0.8);
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.bottle-sparkle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 操作按钮 */
.bottle-actions {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-bottom: 48px;
}

.btn-bottle {
    flex: 1;
    max-width: 280px;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    color: white;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.btn-bottle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-4px);
}

.btn-bottle.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0044B8 100%);
    border-color: var(--primary-color);
}

.btn-bottle i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.btn-bottle span {
    font-size: 16px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.action-desc {
    font-size: 13px;
    opacity: 0.7;
}

/* 漂流瓶编写 */
.bottle-compose, .bottle-received {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-lg);
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.compose-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottle-compose textarea {
    width: 100%;
    min-height: 150px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 16px;
}

.bottle-compose textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.compose-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.compose-options select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.btn-throw {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0044B8 100%);
    color: white;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
}

.btn-throw:hover {
    transform: scale(1.02);
}

/* 捡到的漂流瓶 */
.received-header {
    text-align: center;
    margin-bottom: 24px;
}

.received-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.received-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.bottle-from {
    font-size: 13px;
    color: var(--text-tertiary);
}

.received-content {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.received-content p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.received-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.bottle-type {
    padding: 4px 12px;
    border-radius: 10px;
    font-weight: 500;
}

.bottle-type.thought {
    background: #E3F2FD;
    color: #1976D2;
}

.bottle-time {
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.received-actions {
    display: flex;
    gap: 12px;
}

.btn-reply, .btn-throw-back {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-reply {
    background: var(--primary-color);
    color: white;
}

.btn-throw-back {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* 统计信息 */
.bottle-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bottle-stats .stat-item {
    text-align: center;
    color: white;
}

.bottle-stats i {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.bottle-stats .stat-number {
    font-size: 24px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.bottle-stats .stat-label {
    font-size: 13px;
    opacity: 0.7;
}

/* 响应式 */
@media (max-width: 1024px) {
    .side-panel {
        width: 320px;
    }

    .chat-window {
        right: 360px;
    }
}

@media (max-width: 768px) {
    .map-mode {
        flex-direction: column;
        height: auto;
    }

    #map {
        height: 400px;
    }

    .side-panel {
        width: 100%;
        max-height: 500px;
    }

    .chat-window {
        right: 16px;
        left: 16px;
        width: auto;
    }

    .bottle-actions {
        flex-direction: column;
        padding: 0 16px;
    }

    .btn-bottle {
        max-width: 100%;
    }

    .bottle-stats {
        flex-direction: column;
        gap: 16px;
    }
}
