/* Pornhub Persian - Dark Theme High Graphics CSS */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --bg-card: #1c1c1c;
    --bg-hover: #2a2a2a;
    --accent: #ff9000;
    --accent-hover: #ffaa33;
    --accent-dark: #cc7300;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #777777;
    --border: #333333;
    --danger: #e74c3c;
    --success: #2ecc71;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --transition: all 0.25s ease;
}

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

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ========== HEADER ========== */
.header {
    background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(255, 144, 0, 0.15);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.logo:hover {
    color: var(--text-primary);
}

.logo img {
    height: 40px;
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 30px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.2);
}

.search-box button {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #000;
    font-size: 1rem;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--accent-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a, .nav-links button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent) !important;
    color: #000 !important;
    font-weight: 600 !important;
}

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

.user-menu {
    position: relative;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--accent);
}

.dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 200px;
    box-shadow: var(--shadow);
    display: none;
    overflow: hidden;
}

.dropdown.show {
    display: block;
}

.dropdown a {
    display: block;
    padding: 12px 18px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.dropdown a:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* ========== MAIN LAYOUT ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--accent);
    border-radius: 3px;
}

/* ========== CATEGORIES ========== */
.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cat-btn {
    padding: 8px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.cat-btn:hover, .cat-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 600;
}

/* ========== VIDEO GRID ========== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    border-color: var(--accent);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.video-thumb img,
.video-thumb .thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.25s ease;
    display: block;
}

.video-card:hover .video-thumb img,
.video-card:hover .video-thumb .thumb-img {
    transform: scale(1.05);
}

/* پیش‌نمایش هاور */
.preview-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
    background: #000;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.video-card.is-previewing .thumb-img,
.video-card.is-previewing .thumb-placeholder {
    opacity: 0;
}

.video-card.is-previewing .video-duration,
.video-card.is-previewing .video-hd {
    z-index: 3;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-hd {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: #000;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 800;
}

.video-info {
    padding: 14px;
}

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

.video-title:hover {
    color: var(--accent);
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.video-stats {
    display: flex;
    gap: 12px;
}

.video-author {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 6px;
}

.video-author:hover {
    color: var(--accent);
}

/* ========== VIDEO PAGE ========== */
.video-player-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
}

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

.player-wrapper {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.player-wrapper video {
    width: 100%;
    height: 100%;
}

.video-details {
    margin-top: 20px;
}

.video-details h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.video-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.action-btn.liked {
    background: rgba(255, 144, 0, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.action-btn.liked:hover {
    background: rgba(255, 144, 0, 0.25);
}

.uploader-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin: 20px 0;
}

.uploader-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #000;
}

.uploader-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.uploader-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-follow {
    margin-right: auto;
    padding: 8px 22px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

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

.btn-follow.following {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

/* ========== COMMENTS ========== */
.comments-section {
    margin-top: 30px;
}

.comments-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.comment-form textarea {
    flex: 1;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
}

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

.comment-form button {
    padding: 12px 25px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    align-self: flex-start;
    transition: var(--transition);
}

.comment-form button:hover {
    background: var(--accent-hover);
}

.comment {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

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

.comment-body {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

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

.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

/* ========== SIDEBAR ========== */
.sidebar-videos h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.sidebar-video {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar-video:hover {
    background: var(--bg-hover);
}

.sidebar-thumb {
    width: 140px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    position: relative;
}

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

.sidebar-info {
    flex: 1;
}

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

.sidebar-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== AUTH FORMS ========== */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.auth-container h1 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.auth-container .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

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

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

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 144, 0, 0.15);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-muted);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid var(--danger);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: #2ecc71;
}

/* ========== PROFILE ========== */
.profile-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a1a00 100%);
    border-radius: var(--radius-lg);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.profile-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: #000;
    border: 4px solid var(--accent);
}

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

.profile-bio {
    color: var(--text-secondary);
    margin: 10px 0;
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

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

.stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== UPLOAD ========== */
.upload-form {
    max-width: 700px;
    background: var(--bg-secondary);
    padding: 35px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* ========== FOOTER ========== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .search-box {
        order: 3;
        max-width: 100%;
        margin: 0;
        width: 100%;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
}

/* ========== LOADING & EXTRAS ========== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent);
    color: #000;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Placeholder thumbnails with gradient */
.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a1a00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
    opacity: 0.6;
}
