/* AIseek css/app — restored from 8864c52 baseline */
/* backend/static/css/style.css */
:root {
    --bg-color: #161823;
    --nav-bg: #161823;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --accent-color: #fe2c55;
    --sidebar-width: 240px;
    --header-height: 60px;
    --border-color: rgba(255, 255, 255, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: #161823;
    border-bottom: none; /* Remove border */
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
}

.logo span {
    background: linear-gradient(45deg, #00f2ea, #ff0050);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-bar {
    flex: 0 1 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar input {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    color: white;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.18);
}

.search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 50px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-left: 1px solid rgba(255,255,255,0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.upload-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4rem;
    position: relative;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    cursor: pointer;
    background-image: url('https://p11.hzkv.cn/img/tos-cn-i-0813c001/90240050c95245609805005055005055~c5_300x300.jpeg'); /* Placeholder */
    background-size: cover;
}

/* App Container */
.app-container {
    display: flex;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    border-right: none; /* Remove border */
    overflow-y: auto;
    padding: 12px 8px;
    flex-shrink: 0;
    background: #161823;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
    cursor: pointer;
    background: transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

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

.nav-item i {
    margin-right: 12px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: none; /* Remove border */
}

.section-title {
    padding: 0 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}

/* Main Content Area */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Feed (Infinite Scroll) */
.feed-container {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    background: #161823;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feed-item {
    height: 100%;
    width: 100%;
    position: relative;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    background: #161823;
}

.video-wrapper {
    position: relative;
    height: calc(100% - 20px);
    width: 100%;
    max-width: 56.25vh; /* 9:16 aspect ratio */
    display: flex;
    align-items: center;
    background: #000;
    border-radius: 8px; 
    overflow: hidden;
    margin: 10px 0;
    box-shadow: none;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Video Overlay UI */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 80px 20px 20px; /* Right padding for actions */
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 1;
    transition: opacity 0.3s;
}

.post-info {
    margin-bottom: 15px;
}

.post-author {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 8px;
    cursor: pointer;
}

.post-desc {
    font-size: 15px;
    line-height: 1.4;
    color: #e5e7eb;
}

/* Right Action Bar */
.action-bar {
    position: absolute;
    right: 10px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    z-index: 10;
}

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

.action-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: 0.2s;
}

.action-icon:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.action-text {
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Creator Center Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #252632;
    width: 900px;
    height: 85vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
}

.creator-sidebar {
    width: 200px;
    background: rgba(0,0,0,0.2);
    padding: 20px 0;
}

.creator-nav-item {
    padding: 12px 24px;
    cursor: pointer;
    color: #9ca3af;
    font-weight: 500;
}

.creator-nav-item.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-right: 2px solid var(--accent-color);
}

.creator-main {
    flex: 1;
    padding: 30px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #d1d5db;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
}

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

.upload-box {
    border: 2px dashed rgba(255,255,255,0.2);
    border-radius: 8px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    background: rgba(255,255,255,0.02);
}

.upload-box:hover {
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.05);
}

/* User Profile Page */
.profile-page {
    padding: 30px 50px;
    height: 100%;
    overflow-y: auto;
}

.profile-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: #333;
}

.profile-info h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin: 16px 0;
    color: #fff;
}

.stat-item strong {
    font-size: 18px;
    margin-right: 4px;
}

.stat-item span {
    color: #9ca3af;
    font-size: 14px;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.p-tab {
    padding: 12px 30px;
    cursor: pointer;
    font-weight: 600;
    color: #9ca3af;
    position: relative;
}

.p-tab.active {
    color: white;
}

.p-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.work-card {
    aspect-ratio: 3/4;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.work-card img, .work-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-views {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
