:root {
    --bg-color: #ffffff;
    --text-color: #161823;
    --subtext-color: #8b9095;
    /* Gray text for handles, labels */
    --primary-color: #fe2c55;
    /* TikTok Red */
    --button-secondary-bg: #f1f1f2;
    --border-color: #e3e3e4;
    /* Light border for tabs */
    --line-height-base: 1.5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    min-height: 100vh;
    /* Disable Copy/Selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.container {
    width: 100%;
    max-width: 480px;
    /* Mobile width constraint */
    margin: 0 auto;
    padding-bottom: 50px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 10;
}

.header-icon {
    font-size: 20px;
    color: #161823;
    cursor: pointer;
}

.header-icon.fa-share {
    color: #ffffff;
    /* Inner fill white */
    -webkit-text-stroke: 1.5px #161823;
    /* Black outline */
}

.header-center {
    opacity: 0;
    /* Hidden initially */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-follow-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    display: none;
    /* Hidden by default */
}

/* Profile Header */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px 0;
}

.profile-avatar-container {
    width: 96px;
    height: 96px;
    margin-bottom: 12px;
    position: relative;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(22, 24, 35, 0.12);
}

.profile-avatar-container {
    width: 96px;
    height: 96px;
    margin-bottom: 12px;
    position: relative;
    border-radius: 50%;
}

.profile-name-container {
    text-align: center;
    margin-bottom: 4px;
}

.display-name {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
}

.username {
    font-size: 14px;
    font-weight: 600;
    /* Slightly bolder than normal text */
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.verified-badge {
    color: #20d5ec;
    /* TikTok Blue Check */
    font-size: 12px;
    background: transparent;
    border-radius: 50%;
}

/* Stats */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    /* Increased gap from 24px */
    margin: 16px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-color);
}

.stat-label {
    font-size: 13px;
    color: var(--subtext-color);
    margin-top: 2px;
}

/* Action Buttons */
/* Action Buttons */
/* Action Buttons */
.actions-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    /* Slightly larger gap */
    margin-bottom: 25px;
    padding: 0;
    width: 100%;
    max-width: 300px;
    /* Constrain total width to match stats block */
    margin-left: auto;
    margin-right: auto;
}

.btn {
    border: none;
    border-radius: 8px;
    /* Increased from 4px */
    font-family: inherit;
    font-size: 16px;
    /* Increased from 15px */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    height: 48px;
    /* Increased from 44px */
    /* Standard height */
    flex-grow: 1;
    /* Expand to fill */
}

.btn-follow {
    background-color: var(--primary-color);
    color: white;
    flex: 1;
    /* Match weight with secondary */
    /* Takes more space */
}

.btn-secondary {
    background-color: var(--button-secondary-bg);
    color: var(--text-color);
    flex: 1;
    /* Match weight with follow */
}

.btn-icon {
    background-color: var(--button-secondary-bg);
    color: var(--text-color);
    flex: 0 0 48px;
    /* Fixed square */
    /* Small square-ish button */
    min-width: 48px;
    padding: 0;
}

/* Bio */
.bio-section {
    padding: 0 16px;
    text-align: center;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 12px;
    /* white-space: pre-line removed to prevent double spacing with <br> tags */
}

.bio-link {
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

/* Tabs */
.tabs-container {
    display: flex;
    border-top: 1px solid var(--border-color);
    border-bottom: 0.5px solid var(--border-color);
    height: 44px;
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #d7d7d9;
    /* Gray inactive */
    cursor: pointer;
    position: relative;
}

.tab.active {
    color: var(--text-color);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    width: 40px;
    height: 2px;
    background-color: var(--text-color);
}

.tab-label {
    display: block;
    font-size: 14px;
}

/* Playlist Pills */
.playlist-section {
    display: flex;
    justify-content: center;
    /* Center alignment */
    gap: 12px;
    padding: 16px 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.playlist-section::-webkit-scrollbar {
    display: none;
}

.playlist-pill {
    background-color: #f1f1f2;
    padding: 8px 32px;
    /* Thinner vertically (8px), wider horizontally (32px) */
    border-radius: 4px;
    /* Standard pill radius */
    font-size: 14px;
    /* Adjusted size */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    flex-shrink: 0;
    cursor: pointer;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
}

.video-item {
    position: relative;
    aspect-ratio: 3 / 4;
    /* Portrait ratio */
    background-color: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-item.pinned::before {
    content: 'トップ';
    /* Top pinned label */
    position: absolute;
    top: 4px;
    left: 4px;
    background-color: #fe2c55;
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 2px;
    z-index: 2;
    font-weight: bold;
}

.play-count {
    position: absolute;
    bottom: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.play-icon {
    font-size: 12px;
    color: transparent;
    /* Transparent fill */
    -webkit-text-stroke: 1px white;
    /* White outline */
}

/* Private Account Message */
.private-account-section {
    display: none;
    /* Initially hidden */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-align: center;
    color: var(--text-color);
}

.private-icon {
    font-size: 48px;
    margin-bottom: 24px;
    color: var(--subtext-color);
}

.private-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
}

.private-desc {
    font-size: 14px;
    color: var(--subtext-color);
    line-height: 1.5;
}

.private-cta-btn {
    margin-top: 24px;
    width: 100%;
    max-width: 300px;
    height: auto;
    padding: 15px 0;
    font-size: 18px;
    line-height: 1.4;
}