/* Main CSS for Social Video Theme */

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #FF0000;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #CC0000;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #222;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background-color: #FF0000;
    color: white;
}

.btn-primary:hover {
    background-color: #CC0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.btn-secondary {
    background-color: #333;
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #FF0000;
    color: #FF0000;
}

.btn-outline:hover {
    background-color: #FF0000;
    color: white;
}

/* ===== HEADER ===== */
.main-header {
    background: linear-gradient(135deg, #FF0000 0%, #000000 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
    color: white;
}

.logo span.youtube {
    color: #FF0000;
    font-weight: 800;
}

.logo span.tiktok {
    color: #000000;
    font-weight: 800;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
}

.main-nav a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.9)),
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* ===== VIDEO GRID ===== */
.video-section {
    padding: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Platform Filters */
.platform-filters {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 5px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #FF0000;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.filter-btn.tiktok.active {
    background: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Platform Badge */
.platform-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.youtube-badge {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

.tiktok-badge {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

/* Duration */
.duration {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Video Info */
.video-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.video-title a {
    color: #222;
    text-decoration: none;
}

.video-title a:hover {
    color: #FF0000;
}

.video-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Video Meta */
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.video-meta .views,
.video-meta .date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Video Actions */
.video-actions {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.video-actions .watch-btn,
.video-actions .original-btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 1;
}

/* ===== CONTENT AREA ===== */
.content-area {
    width: 70%;
    float: left;
    padding-right: 30px;
}

.sidebar {
    width: 30%;
    float: left;
}

/* Clear floats */
.content-area::after,
.sidebar::after {
    content: '';
    display: table;
    clear: both;
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #222;
}

.post-title a:hover {
    color: #FF0000;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    color: #FF0000;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: #CC0000;
    gap: 8px;
}

/* ===== SINGLE VIDEO PAGE ===== */
.single-video {
    padding: 2rem 0;
}

.video-detail {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.video-header {
    margin-bottom: 2rem;
    text-align: center;
}

.platform-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.youtube-tag {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

.tiktok-tag {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.video-header h1 {
    margin-bottom: 1rem;
}

.video-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #888;
    font-size: 0.9rem;
}

/* Video Player */
.video-player {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.video-player iframe {
    width: 100%;
    min-height: 500px;
    border: none;
}

/* Video Content */
.video-content {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.video-description {
    flex: 2;
}

.video-sidebar {
    flex: 1;
}

.share-buttons {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
}

.share-buttons h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #333;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.share-btn.facebook {
    border-left: 4px solid #1877F2;
}

.share-btn.twitter {
    border-left: 4px solid #1DA1F2;
}

.share-btn.original {
    border-left: 4px solid #FF0000;
    background: #FF0000;
    color: white;
}

.share-btn.original:hover {
    background: #CC0000;
}

/* Related Videos */
.related-videos {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination .nav-links {
    display: flex;
    gap: 5px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: white;
    color: #333;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination .page-numbers:hover {
    background: #FF0000;
    color: white;
    transform: translateY(-2px);
}

.pagination .current {
    background: #FF0000;
    color: white;
}

.pagination .dots {
    background: transparent;
    box-shadow: none;
}

/* ===== SIDEBAR ===== */
.widget-area {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #FF0000;
}

/* Search Widget */
.search-form {
    display: flex;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-form button {
    background: #FF0000;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-form button:hover {
    background: #CC0000;
}

/* Platform Statistics */
.platform-statistics {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
}

.platform-statistics .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-icon svg {
    width: 30px;
    height: 30px;
    margin-bottom: 10px;
}

.stat-count {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Social Links */
.social-links .social-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon.youtube {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

.social-icon.tiktok {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.main-footer {
    background: #222;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #FF0000;
}

.footer-section p {
    color: #aaa;
    line-height: 1.6;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-menu a:hover {
    color: white;
    padding-left: 5px;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* ===== ERROR PAGES ===== */
.error-404,
.no-content,
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.error-code h1 {
    font-size: 8rem;
    color: #FF0000;
    margin-bottom: 1rem;
    line-height: 1;
}

.error-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.error-search {
    max-width: 500px;
    margin: 2rem auto;
}

/* Search Results */
.search-result-item {
    display: flex;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    gap: 1.5rem;
}

.result-content {
    flex: 1;
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.result-excerpt {
    color: #666;
    line-height: 1.6;
}

.result-thumbnail {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Stats */
.video-stats {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.video-stats .platform {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.video-stats .platform.youtube {
    background: #FF0000;
    color: white;
}

.video-stats .platform.tiktok {
    background: #000000;
    color: white;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== ACCESSIBILITY ===== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ===== PRINT STYLES ===== */
@media print {
    .main-header,
    .main-footer,
    .platform-filters,
    .share-buttons,
    .sidebar,
    .video-player iframe,
    .hero,
    .pagination,
    .video-actions {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .content-area {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    .video-card,
    .post-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}