:root {
    --primary-pink: #FF006E;
    --pink-hover: #FF1A7F;
    --pink-light: #FF4D9E;
    --bg-dark: #0A0A0A;
    --bg-card: #151515;
    --bg-elevated: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --border-subtle: #252525;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Main Header */
.main-header {
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    flex-shrink: 0;
}

.logo svg {
    height: 44px;
    width: auto;
}

.search-container {
    flex: 1;
    min-width: 200px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-pink);
    background-color: var(--bg-card);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.icon-btn:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn.hot-btn {
    color: var(--primary-pink);
}

.icon-btn.hot-btn:hover {
    color: var(--text-primary);
}

.icon-btn.active {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background-color: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
    position: relative;
    color: var(--text-primary);
}

.user-avatar:hover {
    transform: translateY(-1px);
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-subtle);
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    background-color: var(--bg-card);
    color: var(--primary-pink);
}

/* Tag Cloud */
.tag-cloud-wrapper {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
    position: relative;
}

.tag-cloud-container {
    position: relative;
    overflow: hidden;
}

.tag-cloud {
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.tag-cloud::-webkit-scrollbar {
    display: none;
}

.tag-cloud-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.tag-cloud-nav:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
}

.tag-cloud-nav.left {
    left: 0;
}

.tag-cloud-nav.right {
    right: 0;
}

.tag-cloud-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

.tag {
    padding: 8px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tag:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tag.hot {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(to bottom, var(--primary-pink), var(--pink-light));
    border-radius: 2px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.video-card {
    background-color: var(--bg-card);
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
}

.video-info {
    padding: 16px;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.uploader {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.uploader:hover {
    color: var(--primary-pink);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    padding: 10px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.page-btn:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

.page-btn.active {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.disabled:hover {
    background-color: var(--bg-elevated);
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background-color: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    margin-top: 64px;
    padding: 48px 0 0;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.footer-section h3 {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--primary-pink);
}

/* Bottom Footer Bar */
.bottom-bar {
    background-color: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
    padding: 16px 0;
    margin: 0;
}

.bottom-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.bottom-bar-links {
    display: flex;
    gap: 20px;
}

.bottom-bar a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.bottom-bar a:hover {
    color: var(--primary-pink);
}

/* Form Styles */
.form-container {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.form-title {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    font-size: 15px;
}

.form-subtitle a {
    color: var(--primary-pink);
    text-decoration: none;
    transition: color 0.2s;
}

.form-subtitle a:hover {
    color: var(--pink-hover);
}

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

.form-label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-pink);
    background-color: var(--bg-card);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
}

.form-button {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary-pink);
    border: 1px solid var(--primary-pink);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form-button:hover {
    background-color: var(--pink-hover);
    border-color: var(--pink-hover);
    transform: translateY(-1px);
}

.form-button:active {
    transform: translateY(0);
}

.file-upload-area {
    border: 2px dashed var(--border-subtle);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    background-color: var(--bg-elevated);
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--primary-pink);
    background-color: var(--bg-card);
}

.file-upload-area.dragover {
    border-color: var(--primary-pink);
    background-color: var(--bg-card);
}

.file-upload-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.file-upload-text {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.file-upload-hint {
    color: var(--text-muted);
    font-size: 14px;
}

.file-input {
    display: none;
}

.selected-file {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selected-file-name {
    color: var(--text-primary);
    font-weight: 500;
}

.remove-file {
    color: var(--primary-pink);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .logo {
        width: 100%;
        text-align: center;
        order: 1;
    }

    .search-container {
        width: 100%;
        order: 3;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        order: 2;
    }

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

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .bottom-bar-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section-title {
        font-size: 24px;
    }

    .form-container {
        margin: 40px 16px;
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 24px;
    }
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==================== VIDEO PAGE STYLES ==================== */

/* Override main-content for video pages */
.main-content.video-page {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.main-video-section {
    flex: 1;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 24px;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.play-overlay:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.play-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.play-overlay:hover .play-button {
    transform: scale(1.1);
    background-color: var(--pink-hover);
}

.play-button svg {
    width: 32px;
    height: 32px;
    fill: white;
    margin-left: 4px;
}

.video-title-main {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.video-meta-section {
    margin-bottom: 24px;
}

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

.video-tag {
    padding: 6px 12px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.video-tag:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    color: var(--text-primary);
}

.uploader-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 24px;
}

.uploader-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink), var(--pink-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.uploader-info {
    flex: 1;
}

.uploader-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.uploader-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.subscribe-btn {
    padding: 10px 24px;
    background-color: var(--primary-pink);
    border: 1px solid var(--primary-pink);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.subscribe-btn:hover {
    background-color: var(--pink-hover);
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.action-btn:hover {
    background-color: var(--primary-pink);
    border-color: var(--primary-pink);
    transform: translateY(-1px);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.sidebar {
    width: 350px;
    flex-shrink: 0;
}

.sidebar-section {
    background-color: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.sidebar-title {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.sidebar-video {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    cursor: pointer;
}

.sidebar-video:last-child {
    margin-bottom: 0;
}

.sidebar-thumb {
    width: 120px;
    height: 68px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border-radius: 6px;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-thumb-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.sidebar-video-info {
    flex: 1;
}

.sidebar-video-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.sidebar-video-uploader {
    font-size: 12px;
    color: var(--text-muted);
}

.related-videos-section {
    margin-bottom: 48px;
}

.more-from-user-section {
    margin-bottom: 48px;
}

.comments-section {
    margin-bottom: 48px;
}

.comments-header {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.comment-form {
    margin-bottom: 32px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    resize: vertical;
    margin-bottom: 12px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-pink);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.comment-btn {
    padding: 10px 20px;
    background-color: var(--primary-pink);
    border: 1px solid var(--primary-pink);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-btn:hover {
    background-color: var(--pink-hover);
}

.comment-btn.cancel {
    background-color: transparent;
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

.comment-btn.cancel:hover {
    background-color: var(--bg-elevated);
}

.comment {
    margin-bottom: 24px;
}

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

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink), var(--pink-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.comment-text {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.comment-action {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.comment-action:hover {
    color: var(--primary-pink);
}

.comment-replies {
    margin-left: 52px;
    margin-top: 16px;
}

/* Video Page Responsive */
@media (max-width: 1024px) {
    .main-content.video-page {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .uploader-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* AVIF Preview Styles */
.video-thumbnail {
    position: relative;
}

.video-preview-static,
.video-preview-animated {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

.video-preview-animated {
    opacity: 0;
}

/* Show animated on hover (desktop) */
.video-card:hover .video-preview-animated {
    opacity: 1;
}

/* Mobile: show on touch/active */
.video-card.playing .video-preview-animated {
    opacity: 1;
}

a.video-card {
    text-decoration: none;
}

/* Also remove hover underline */
a.video-card:hover {
    text-decoration: none;
}
