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

:root {
    --primary: #12b7f5;
    --primary-dark: #0d9ed4;
    --accent: #ff6b6b;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #e8e8e8;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #e8f4fd 0%, #f0f2f5 30%, #f5f5f5 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

/* ===== Container ===== */
.container {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ===== Cover Section ===== */
.cover-section {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    margin-bottom: -60px;
}

.cover-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #12b7f5 0%, #6dd5fa 25%, #a8e6cf 50%, #ffd3b6 75%, #ffaaa5 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

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

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Profile Card ===== */
.profile-card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0 24px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

/* ===== Avatar ===== */
.avatar-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -50px;
    margin-bottom: 12px;
}

.avatar-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #12b7f5, #a8e6cf);
    box-shadow: 0 4px 20px rgba(18,183,245,0.3);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-male {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.avatar-female {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.avatar-text {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    user-select: none;
}

.level-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(255,170,0,0.4);
    margin-bottom: 10px;
}

/* ===== Info Section ===== */
.info-section {
    text-align: center;
    padding: 8px 0 16px;
}

.nickname {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.qq-number {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    background: #f5f7fa;
    padding: 4px 14px;
    border-radius: 20px;
}

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

/* ===== Status Bar ===== */
.status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #f0f9ff, #ecfdf5);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.status-text {
    font-size: 15px;
    font-weight: 500;
    color: #444;
}

/* ===== Details Grid ===== */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.detail-card {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 14px 8px;
    text-align: center;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.detail-card:hover {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(18,183,245,0.15);
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.detail-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* ===== Section ===== */
.section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== Tags ===== */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #e0f2fe, #d9f99d);
    color: #333;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    cursor: default;
}

.tag:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tag:nth-child(1) { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.tag:nth-child(2) { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.tag:nth-child(3) { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }

/* ===== Stats ===== */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 20px 12px;
}

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

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #12b7f5, #6dd5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ===== Tab Bar ===== */
.tab-bar {
    display: flex;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    gap: 4px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
}

.tab.active {
    background: linear-gradient(135deg, #12b7f5, #6dd5fa);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(18,183,245,0.3);
}

.tab:not(.active):hover {
    background: #f0f2f5;
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px 16px 20px;
    color: var(--text-light);
    font-size: 12px;
}

.footer p {
    margin-bottom: 4px;
}

.ssl-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #22c55e;
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 8px 20px;
    }

    .profile-card {
        padding: 0 16px 16px;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .nickname {
        font-size: 22px;
    }

    .stats-row {
        padding: 16px 8px;
    }

    .stat-number {
        font-size: 24px;
    }
}
