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

:root {
    --bg: #010101;
    --surface: #121212;
    --accent: #FE2C55;
    --accent-hover: #ff4466;
    --text: #ffffff;
    --text-muted: rgba(255,255,255,0.75);
    --border: rgba(255,255,255,0.1);
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
    pointer-events: none;
}

.nav-tabs {
    display: flex;
    gap: 24px;
    pointer-events: all;
}

.nav-tab {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    transition: color 0.2s;
}

.nav-tab.active {
    color: #fff;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-admin {
    position: absolute;
    right: 16px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 20px;
    pointer-events: all;
}

/* Feed Container - TikTok Scroll Snap */
.feed-container {
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

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

/* Video Slide */
.video-slide {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #000;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay */
.video-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.5) 100%);
}

/* Right Action Buttons */
.video-actions {
    position: absolute;
    right: 12px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: all;
    z-index: 10;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.15s;
}

.action-btn svg {
    width: 26px;
    height: 26px;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn.liked {
    color: var(--accent);
    animation: likePop 0.4s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.action-count {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border: 2px solid #fff;
}

/* Bottom Video Info */
.video-info {
    padding: 0 80px 90px 16px;
    pointer-events: all;
}

.video-author {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.author-name {
    font-weight: 700;
    font-size: 16px;
}

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

.video-desc {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tag {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.music-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
}

.music-icon {
    animation: spin 3s linear infinite;
}

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

.music-text {
    white-space: nowrap;
    animation: marquee 8s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Play Indicator */
.play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s;
}

.play-indicator svg {
    width: 36px;
    height: 36px;
}

.play-indicator.hidden {
    opacity: 0;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0 20px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.2s;
}

.bottom-item svg {
    width: 24px;
    height: 24px;
}

.bottom-item.active {
    color: #fff;
}

.upload-icon {
    width: 44px;
    height: 30px;
    background: linear-gradient(135deg, #25f4ee, var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.upload-icon span {
    font-size: 22px;
    font-weight: 300;
    color: #fff;
}

/* Comment Modal */
.comment-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
}

.comment-modal.hidden {
    display: none;
}

.comment-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.comment-panel {
    position: relative;
    width: 100%;
    max-height: 60vh;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

.comment-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    min-height: 200px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-body .comment-user {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.comment-body .comment-text {
    font-size: 14px;
    color: var(--text-muted);
}

.comment-input-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.comment-input-bar input {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.comment-input-bar button {
    background: var(--accent);
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

/* Desktop responsive */
@media (min-width: 768px) {
    .feed-container {
        max-width: 420px;
        margin: 0 auto;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }

    .bottom-nav, .top-nav {
        max-width: 420px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Admin Styles */
.admin-body {
    overflow: auto;
    background: var(--bg);
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(254, 44, 85, 0.1);
    color: var(--accent);
}

.admin-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
}

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

.admin-header h1 {
    font-size: 24px;
    font-weight: 700;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.admin-table th {
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-weight: 600;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-danger {
    background: rgba(254, 44, 85, 0.2);
    color: var(--accent);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #010101 0%, #1a0a10 50%, #010101 100%);
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 8px;
}

.login-box p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: rgba(254, 44, 85, 0.15);
    color: var(--accent);
    border: 1px solid rgba(254, 44, 85, 0.3);
}

.alert-success {
    background: rgba(32, 213, 236, 0.15);
    color: #20d5ec;
    border: 1px solid rgba(32, 213, 236, 0.3);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success { background: rgba(32,213,236,0.2); color: #20d5ec; }
.badge-warning { background: rgba(255,193,7,0.2); color: #ffc107; }
.badge-danger { background: rgba(254,44,85,0.2); color: var(--accent); }

@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
}

/* Profile Page */
.profile-body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 80px;
}

.profile-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(1, 1, 1, 0.95);
    border-bottom: 1px solid var(--border);
}

.profile-header h1 {
    font-size: 18px;
    font-weight: 600;
}

.profile-back, .profile-logout {
    width: 60px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.profile-logout {
    text-align: right;
    color: var(--accent);
}

.profile-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 100px;
}

.profile-card {
    text-align: center;
    padding: 24px 16px;
}

.profile-card .profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #ff6b8a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto 16px;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    margin-bottom: 4px;
}

.profile-handle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.profile-bio {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.profile-stats div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stats strong {
    font-size: 18px;
}

.profile-stats span {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-upload-btn {
    display: inline-block;
    padding: 12px 32px;
    text-decoration: none;
}

.profile-videos h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-left: 4px;
}

.profile-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 40px 0;
}

.profile-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.profile-video-item {
    position: relative;
    aspect-ratio: 9/16;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
}

.profile-video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #666;
    font-size: 24px;
}

.profile-video-views {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.profile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.profile-avatar-link {
    text-decoration: none;
    color: inherit;
}

.video-author .author-name {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.video-author .author-name:hover {
    text-decoration: underline;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto 16px;
}

.profile-avatar-edit {
    display: block;
    margin: 12px auto 0;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.avatar-crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.avatar-crop-modal.hidden {
    display: none;
}

.avatar-crop-panel {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.avatar-crop-panel h3 {
    margin-bottom: 12px;
    text-align: center;
}

.avatar-crop-area {
    max-height: 360px;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.avatar-crop-area img {
    display: block;
    max-width: 100%;
}

.avatar-crop-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.avatar-crop-actions .btn {
    flex: 1;
    padding: 12px;
}

/* ===== App Pages (Android-style) ===== */
.app-page {
    overflow: auto;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    padding-bottom: 84px;
}

.app-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    padding: 14px 8px;
    background: rgba(1, 1, 1, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.app-header-title {
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

.app-header-btn {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    padding: 8px 12px;
}

.app-header-right {
    display: flex;
    justify-content: flex-end;
}

.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
}

.btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #FE2C55 0%, #ff6b8a 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(254, 44, 85, 0.25);
}

.btn-gradient.full { width: 100%; }
.btn-gradient:hover { filter: brightness(1.05); }

.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 16px;
    margin: 20px 0 12px;
}

/* Guest Profile */
.guest-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
}

.guest-profile-card {
    width: 100%;
    max-width: 420px;
    text-align: center;
    padding: 24px 8px;
}

.guest-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.guest-profile-card h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.guest-profile-card > p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.guest-form .form-group { margin-bottom: 12px; }
.guest-switch { margin-top: 16px; color: #888; font-size: 14px; }
.guest-switch a { color: var(--accent); text-decoration: none; }
.guest-note { margin-top: 20px; font-size: 13px; color: #666; }

/* Profile Hero (Android layout) */
.profile-top-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    padding: 12px 10px;
    background: rgba(1,1,1,0.96);
    border-bottom: 1px solid var(--border);
}

.profile-top-bar h1 {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
}

.profile-top-back, .profile-top-settings {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.profile-app { padding-top: 8px; }

.profile-hero {
    padding: 8px 4px 20px;
}

.profile-hero-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.profile-avatar-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #FE2C55, #ff6b8a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.08);
}

.profile-avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero-stats {
    flex: 1;
    display: flex;
    justify-content: space-evenly;
}

.profile-hero-stats div {
    text-align: center;
}

.profile-hero-stats strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.profile-hero-stats span {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-identity h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #20d5ec;
    color: #000;
    font-size: 11px;
    font-weight: 700;
}

.profile-identity-bio {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.profile-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.profile-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.profile-tabs-wrap { margin-top: 8px; }

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.profile-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    position: relative;
}

.profile-tab.active {
    color: #fff;
}

.profile-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.profile-tab-panel { display: none; }
.profile-tab-panel.active { display: block; }

.profile-empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

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

.profile-video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-video-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Edit Profile */
.edit-profile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
}

.edit-avatar-block {
    text-align: center;
    margin-bottom: 24px;
}

.edit-profile-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
}

/* Wallet */
.wallet-balance-card {
    background: linear-gradient(135deg, #FE2C55 0%, #7b2ff7 100%);
    border-radius: 20px;
    padding: 28px 24px;
    margin-bottom: 16px;
    box-shadow: 0 12px 32px rgba(254, 44, 85, 0.25);
}

.wallet-label { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }
.wallet-amount { font-size: 42px; font-weight: 800; margin-bottom: 4px; }
.wallet-sub { opacity: 0.85; font-size: 14px; }

.wallet-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.wallet-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.wallet-stat span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.wallet-stat strong { font-size: 18px; }

/* Action List */
.app-action-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.app-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.app-action-item:last-child { border-bottom: none; }
.app-action-item.static { cursor: default; }
.app-action-arrow { color: #666; font-size: 20px; }
.app-action-meta { color: var(--text-muted); font-size: 12px; }

/* Tasks */
.task-list { display: flex; flex-direction: column; gap: 12px; }

.task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.task-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.task-card-top h3 { font-size: 15px; margin-bottom: 4px; }
.task-card-top p { color: var(--text-muted); font-size: 13px; }
.task-reward { color: #20d5ec; font-weight: 700; white-space: nowrap; }

.task-progress {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 10px;
}

.task-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FE2C55, #ff6b8a);
    border-radius: 999px;
}

.task-card-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.task-claim {
    color: var(--accent);
    font-weight: 700;
}

.task-claim.done { color: #20d5ec; }
.task-done { opacity: 0.85; }

/* Referral */
.referral-hero {
    text-align: center;
    padding: 12px 0 24px;
}

.referral-icon { font-size: 48px; margin-bottom: 12px; }
.referral-hero h2 { margin-bottom: 8px; }
.referral-hero p { color: var(--text-muted); font-size: 14px; }

.referral-code-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}

.referral-code-card > p {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.referral-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-code-row strong {
    flex: 1;
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--accent);
}

.referral-link-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    padding: 10px 12px;
    font-size: 12px;
}

.btn-copy {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.referral-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 20px 0;
}

.referral-stats div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.referral-stats strong { display: block; font-size: 22px; margin-bottom: 4px; }
.referral-stats span { color: var(--text-muted); font-size: 12px; }

/* Settings */
.settings-section-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0;
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.settings-row:last-child { border-bottom: none; }
.settings-row strong { display: block; margin-bottom: 4px; }
.settings-row span { color: var(--text-muted); font-size: 12px; }

.btn-logout {
    display: block;
    text-align: center;
    margin-top: 24px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(254, 44, 85, 0.15);
    border: 1px solid rgba(254, 44, 85, 0.35);
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.settings-version {
    text-align: center;
    color: #555;
    font-size: 12px;
    margin-top: 20px;
}

/* Sponsored videos */
.sponsored-label {
    position: absolute;
    top: 72px;
    left: 16px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 6px 12px;
    border-radius: 999px;
    text-transform: uppercase;
}

.video-slide.is-sponsored .video-player {
    filter: brightness(0.75);
}

.video-slide.is-sponsored.is-playing .video-player,
.video-slide.is-sponsored .video-player[data-await-play="0"] {
    filter: none;
}

.sponsored-play-btn {
    position: absolute;
    left: 50%;
    bottom: 120px;
    transform: translateX(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(254, 44, 85, 0.92);
    border: none;
    color: #fff;
    border-radius: 999px;
    min-width: 88px;
    padding: 16px 24px;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(254, 44, 85, 0.35);
}

.sponsored-play-btn.hidden {
    display: none;
}

.sponsored-play-icon {
    font-size: 22px;
    line-height: 1;
}

.sponsored-play-text {
    font-size: 13px;
    font-weight: 700;
}

.upload-camera-box {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    padding: 12px;
}

.camera-preview {
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    background: #111;
    margin-bottom: 12px;
}

.profile-video-item-wrap {
    position: relative;
}

.profile-delete-form {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
}

.profile-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(254, 44, 85, 0.9);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.profile-sponsored-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(254, 44, 85, 0.9);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 900px) {
    .admin-table + div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

.trim-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.trim-modal.hidden { display: none; }
.trim-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.75); }
.trim-panel { position: relative; z-index: 1; width: min(92vw, 480px); background: #161616; border: 1px solid #333; border-radius: 16px; padding: 20px; color: #fff; }
.trim-panel h3 { margin: 0 0 8px; }
.trim-subtitle { color: #888; font-size: 13px; margin-bottom: 12px; }
.trim-panel video { width: 100%; border-radius: 10px; background: #000; max-height: 240px; }
.trim-panel input[type=range] { width: 100%; margin: 12px 0; }
.trim-info { text-align: center; color: #FE2C55; font-weight: 600; margin-bottom: 16px; }
.trim-actions { display: flex; gap: 10px; }
.trim-actions .btn { flex: 1; }
.report-reasons { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.report-reason { background: #222; border: 1px solid #333; color: #fff; border-radius: 8px; padding: 12px; text-align: left; cursor: pointer; }
.report-reason.active { border-color: #FE2C55; color: #FE2C55; }
.repost-btn.reposted { color: #FE2C55; }



