/*
Theme Name: Video Sharing Theme
Theme URI: http://example.com/
Author: Your Name
Author URI: http://example.com/
Description: A custom WordPress theme converted from a PHP video sharing script.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: video-sharing-theme
Tags: video, sharing, custom
*/
body {
    background: #121212;
    color: #e0e0e0;
    font-family: 'Tajawal', Arial, sans-serif;
    margin: 0;
}
.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a1a1a;
    padding: 20px 40px;
}
.site-title {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    background: #ffa500;
    padding: 5px 15px;
    border-radius: 6px;
    text-decoration: none;
}
.site-title a {
    color: inherit;
    text-decoration: none;
}
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}
.search-form input[type="text"] {
    padding: 16px 22px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.15em;
    flex-grow: 1;
    outline: none;
}
.search-form input[type="text"]::placeholder {
    color: #888;
    opacity: 1;
}
.search-form input[type="text"]::-ms-input-placeholder {
    color: #888;
}
.search-form button {
    background: #E91E63;
    color: #fff;
    border: none;
    padding: 16px 30px;
    font-size: 1.15em;
    cursor: pointer;
    font-weight: bold;
}
.search-form button:hover {
    background: #d81b60;
}
.section-title {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 25px;
    text-align: left;
    padding-left: 20px;
}
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.video-card {
    background: #232323;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    position: relative;
}
.video-card:hover {
    transform: translateY(-6px) scale(1.03);
}
.thumb-wrap {
    position: relative;
}
.duration {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    z-index: 2;
}
.thumb {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}
.video-info {
    padding: 16px;
}
.video-title {
    color: #ff9900;
    font-size: 1.05em;
    font-weight: bold;
    margin: 8px 0 4px 0;
    min-height: 38px;
}
.video-meta {
    color: #fff;
    font-size: 0.98em;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.percent {
    color: #ffcc00;
    font-weight: bold;
}
.meta {
    font-size: 0.95em;
    color: #bbb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.badge {
    background: #00ff00;
    color: #222;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.85em;
    margin-right: 8px;
    font-weight: bold;
}
.footer-tags {
    background: #222;
    padding: 12px 0 8px 0;
    text-align: center;
    border-top: 2px solid #333;
}
.footer-tags a {
    color: #bbb;
    background: #303030;
    padding: 5px 12px;
    margin: 0 2px 4px 2px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.98em;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}
.footer-tags a:hover {
    background: #E91E63;
    color: #fff;
}
.footer-bar {
    background: #181818;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    font-size: 1em;
    border-top: 1px solid #333;
}
@media (max-width: 600px) {
    .main-content, .videos-container {
        padding: 0 10px !important;
    }
    .videos-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .video-card {
        border-radius: 10px !important;
        margin-bottom: 15px !important;
        background: #232323 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        min-height: 230px !important;
    }
    .thumb-wrap {
        width: 100% !important;
        position: relative !important;
    }
    .thumb {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
        object-fit: cover !important;
        display: block !important;
        border-radius: 0 !important;
    }
    .duration {
        position: absolute !important;
        bottom: 8px !important;
        right: 8px !important;
        top: auto !important;
        left: auto !important;
        font-size: 0.85em !important;
        font-weight: normal !important;
        color: #fff !important;
        background-color: rgba(0,0,0,0.75) !important;
        padding: 3px 8px !important;
        border-radius: 5px !important;
        margin-left: 0 !important;
        z-index: 2 !important;
        white-space: nowrap !important;
    }
    .video-info {
        padding: 0px 8px 10px 8px !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-top: auto;
    }
    .video-title {
        font-size: 0.9em !important;
        color: #ff4081 !important;
        font-weight: bold !important;
        line-height: 1.35 !important;
        margin: 10px 0 0 0 !important;
        min-height: 34px !important;
        height: auto !important;
        text-align: center !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }
    .video-meta {
        display: none !important;
    }
    .site-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .search-form input[type="text"] {
        font-size: 1em;
    }
    .search-form button {
        font-size: 1em;
        padding: 10px 15px;
    }
    .section-title {
        font-size: 1.6em;
        margin-bottom: 20px;
        padding-left: 10px;
    }
    .custom-search-form {
        width: 98%;
        min-width: 0;
        max-width: 100%;
        margin: 10px auto;
        border-radius: 8px;
    }
    .custom-search-input {
        font-size: 1em;
        padding: 12px 10px;
    }
    .custom-search-btn {
        padding: 0 14px;
        font-size: 1.1em;
    }
}

@media (max-width: 400px) {
    .header-bar {
        flex-direction: column;
        padding: 10px 0;
    }
    .site-title {
        margin-right: 0;
        margin-bottom: 10px;
    }
    .search-form {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
    .search-form input[type="text"] {
        width: 70%;
    }
    .nav-cats {
        padding: 5px 0;
    }
    .cat-btn {
        padding: 5px 10px;
        margin: 0 2px;
    }
    .footer-tags a {
        padding: 3px 8px;
        font-size: 0.85em;
    }
    .custom-search-form {
        flex-direction: column;
        width: 100%;
        border-radius: 8px;
    }
    .custom-search-input {
        width: 100%;
        border-radius: 8px 8px 0 0;
        margin-bottom: 2px;
    }
    .custom-search-btn {
        width: 100%;
        border-radius: 0 0 8px 8px;
        padding: 12px 0;
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .related-videos-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    .related-video-card {
        min-height: 220px;
    }
    .related-title {
        font-size: 0.9em;
        min-height: 36px;
    }
    form[role="search"] {
        max-width: 90%; /* تقليل العرض على الشاشات الصغيرة */
    }

    form[role="search"] input[type="search"] {
        padding: 12px 18px;
        font-size: 1em;
    }

    form[role="search"] input[type="submit"] {
        padding: 12px 20px;
        font-size: 1em;
    }
}
.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin: 30px 0 60px 0;
}
.related-video-card {
    background: #232323;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 260px;
}
.related-video-card:hover {
    transform: translateY(-6px) scale(1.03);
}
.related-thumb-wrap {
    width: 100%;
    position: relative;
}
.related-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.related-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #000c;
    color: #fff;
    font-size: 0.9em;
    padding: 2px 8px;
    border-radius: 6px;
}
.related-title {
    color: #ff4081;
    font-size: 1em;
    font-weight: bold;
    margin: 12px 8px 8px 8px;
    text-align: center;
    min-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.video-card:hover .thumbnail-wrapper::before {
    /* Add your styles here */
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.page-numbers {
    display: inline-flex; /* Use inline-flex for better alignment */
    align-items: center;
    justify-content: center;
    min-width: 40px; /* Minimum width for the button */
    height: 40px; /* Height of the button */
    padding: 0 10px; /* Horizontal padding */
    margin: 3px;
    border-radius: 8px; /* Rounded corners */
    text-decoration: none;
    font-size: 1em;
    font-weight: bold;
    color: #fff; /* Default text color */
    transition: background-color 0.3s, color 0.3s;
}

.page-numbers:not(.dots):hover {
    background-color: #555;
    color: #fff;
}

.page-numbers.current {
    background-color: #E91E63; /* Pink background for current page */
    color: #fff;
    cursor: default;
}

.page-numbers:not(.current) {
    background-color: #424242; /* Dark gray background for inactive pages */
    color: #fff;
}

.page-numbers.dots {
    background-color: transparent;
    color: #aaa;
    cursor: default;
    padding: 0 5px;
    min-width: auto;
}

.page-numbers.prev,
.page-numbers.next {
    padding: 0 15px; /* More padding for prev/next text */
}

/* Responsive adjustments for pagination */
@media (max-width: 480px) {
    .page-numbers {
        min-width: 35px;
        height: 35px;
        font-size: 0.9em;
        margin: 2px;
    }
    .page-numbers.prev,
    .page-numbers.next {
        padding: 0 10px;
    }
    .pagination {
        margin-top: 25px;
    }
}

/* Styles for the WordPress search form */
form[role="search"] {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: #333; /* تغيير الخلفية لتتناسب مع القالب */
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin: 0 auto; /* توسيط النموذج */
    border: 1px solid #444; /* إضافة حدود */
}

form[role="search"] label {
    /* Visually hide the label, but keep it for accessibility */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

form[role="search"] input[type="search"] {
    padding: 16px 22px;
    border: none;
    background: transparent;
    color: #fff; /* تغيير لون النص إلى الأبيض */
    font-size: 1.15em;
    flex-grow: 1;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

form[role="search"] input[type="search"]::placeholder {
    color: #bbb; /* تغيير لون النص المؤقت */
    opacity: 1;
}
form[role="search"] input[type="search"]::-ms-input-placeholder { 
    color: #888;
}

form[role="search"] input[type="submit"] {
    background: #E91E63;
    color: #fff;
    border: none;
    padding: 16px 30px;
    font-size: 1.15em;
    cursor: pointer;
    font-weight: bold;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.3s;
}

form[role="search"] input[type="submit"]:hover {
    background: #d81b60;
}

/* Header Styles */
.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #222;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.site-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #E91E63;
    margin-bottom: 20px;
    text-align: center;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .site-title {
        font-size: 2em;
    }
    .search-container {
        width: 90%;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5em;
    }
    .header-container {
        padding: 15px;
    }
}

.main-navigation .main-menu {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-navigation .main-menu li a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s;
}
.main-navigation .main-menu li a:hover {
    color: #ffa500;
}
.search-container {
    min-width: 300px;
}

.new-style-header {
    background: #000;
    padding: 18px 0 0 0;
    text-align: center;
}

.center-logo {
    text-align: center;
    margin-bottom: 0;
}

.site-title-green {
    font-size: 2.2em;
    font-weight: bold;
    color: #39d12a;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
}

.search-bar-green {
    background: #2a2a2a;
    padding: 18px 0 18px 0;
    text-align: center;
}

.green-search-form {
    display: inline-flex;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.green-search-input {
    padding: 10px 16px;
    border: 2px solid #39d12a;
    border-radius: 3px 0 0 3px;
    font-size: 1.1em;
    width: 350px;
    max-width: 80vw;
    background: #fff;
    color: #222;
    outline: none;
}

.green-search-btn {
    background: #39d12a;
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    padding: 10px 22px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.green-search-btn:hover {
    background: #2e9e1a;
}

@media (max-width: 600px) {
    .green-search-form {
        max-width: 98vw;
    }
    .green-search-input {
        width: 60vw;
        font-size: 1em;
    }
    .site-title-green {
        font-size: 1.3em;
    }
}

.placeholder-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background: #333;
    display: block;
}

.header-bar.new-style-header {
    background: #2A2A2A !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 0 32px 0;
    border: none;
    margin-bottom: 0;
}
.site-title-green {
    color: #39d12a;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 1px;
    font-family: Arial, sans-serif;
    margin-right: 32px;
    text-decoration: none;
}
.green-search-form {
    display: flex;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
.green-search-input {
    padding: 10px 16px;
    border: 2px solid #39d12a;
    border-radius: 3px 0 0 3px;
    font-size: 1.1em;
    width: 350px;
    max-width: 80vw;
    background: #333;
    color: #fff;
    outline: none;
}
.green-search-btn {
    background: #39d12a;
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    padding: 10px 22px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.green-search-btn:hover {
    background: #2e9e1a;
}
@media (max-width: 600px) {
    .header-bar.new-style-header {
        flex-direction: column;
        padding: 18px 0 18px 0;
    }
    .site-title-green {
        margin-right: 0;
        margin-bottom: 12px;
        font-size: 1.3em;
    }
    .green-search-form {
        width: 98vw;
        max-width: 100%;
    }
    .green-search-input {
        width: 60vw;
        font-size: 1em;
    }
} 