/* Global Styles */
html, body {
    margin: 0;
    padding: 0;
    background: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

a {
    color: rgb(0,100,200);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: inherit;
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Styles */
header {
    background: #1a1a1a;
    padding: 1rem 0;
    border-bottom: 1px solid #2a2a2a;
}

.main-nav {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.logo {
    text-decoration: none;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-display: swap;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.logo-text img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 0px;
    vertical-align: middle;
}

.fap {
    color: #ff3e3e;
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: #999;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
    text-transform: uppercase;
}

.nav-link:visited {
    color: #999;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover:visited {
    color: #fff;
}

.nav-link.active {
    color: #fff;
}

.nav-link.active:visited {
    color: #fff;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ff2e2e;
}

.search-container {
    min-width: 300px;
    position: relative;
}

.search-form {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 300px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #2a2a2a;
    border-radius: 8px;
    width: 100%;
}

.search-form input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
}

.search-form input::placeholder {
    color: #666;
}

.search-form button {
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    color: #e2e2e2;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.search-form button:hover {
    color: #fff;
}

.search-form button svg {
    width: 1.2rem;
    height: 1.2rem;
}

.suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    border-bottom: 1px solid #333;
    width: 100%;
    text-align: left;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #333;
}

.suggestion-text {
    flex: 1;
    font-size: 0.9rem;
}

.suggestion-count {
    color: #666;
    font-size: 0.8rem;
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 12px;
}

.language-selector {
    position: relative;
    z-index: 100;
    box-sizing: border-box;
}

.desktop-lang {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    max-width: calc(100% - 3rem);
    box-sizing: border-box;
}

.mobile-lang {
    margin-bottom: 1rem;
    width: 100%;
}

.lang-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-lang .lang-display {
    justify-content: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
}

.lang-display:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.current-lang {
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

.mobile-lang .current-lang {
    font-size: 1rem;
}

.lang-arrow {
    width: 1rem;
    height: 1rem;
    color: #fff;
    transition: transform 0.2s ease;
}

.lang-arrow.open {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(31, 31, 31, 0.95);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 150px;
    max-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform-origin: top right;
    box-sizing: border-box;
    word-wrap: break-word;
}

.desktop-lang .lang-menu {
    max-width: min(200px, calc(100vw - 3rem));
    right: 0;
    left: auto;
}

.mobile-lang .lang-menu {
    position: relative;
    top: 0.5rem;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    z-index: 100;
    pointer-events: auto;
    box-sizing: border-box;
}

.lang-option {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: break-word;
    word-break: break-word;
}

.mobile-lang .lang-option {
    text-align: center;
    font-size: 1rem;
    padding: 1rem;
    pointer-events: auto;
    z-index: 10;
    box-sizing: border-box;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
    color: #fff;
}

.desktop-lang .lang-option:hover {
    transform: translateX(4px);
}

.lang-option:visited {
    color: #fff;
}

.lang-option:active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.mobile-lang .lang-option:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.mobile-lang .lang-option:visited {
    color: #fff;
}

.mobile-lang .lang-option:active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #fff;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.bar {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-icon.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-icon.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-icon.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    display: none;
}

/* Main Content */
main {
    flex: 1;
    background: #121212;
}

.content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 1.5rem;
}

.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.total-results {
    color: #999;
    font-size: 0.9rem;
}

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

.video-card-wrapper {
    display: block;
    background-color: #1c1c1c;
    border-radius: 8px;
    border: 1px solid #020202;
}

.video-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    cursor: pointer;
}

.video-card:visited {
    color: inherit;
}

.video-card:hover {
    transform: translateY(-2px);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.video-preview {
    opacity: 0;
    object-fit: contain;
    background-color: #000;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.video-card:hover .video-preview {
    opacity: 1;
}

.video-thumbnail {
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.video-info {
    padding: 8px;
}

.video-title {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #999;
}

.date {
    font-size: 0.8rem;
    color: #ececec;
    margin-top: 0.25rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 2.5rem 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #30445f;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pagination-btn:hover:not(.disabled) {
    background: #334155;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #2563eb;
    color: #ffffff;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.pagination-ellipsis {
    color: #94a3b8;
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

.nav-arrow {
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
}

/* Watch Page */
.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    width: 100%;
    overflow-x: hidden;
}

.page-container > main {
    flex: 1;
    width: 100%;
    max-width: min(1700px, 100%);
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.video-container {
    width: 100%;
    background: #000;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-player {
    width: 100%;
    background: #000;
    max-height: 680px;
    will-change: transform;
}

.video-info {
    padding: 1rem;
}

h1 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: #fff;
}

.meta-info {
    display: flex;
    gap: 1rem;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #333;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
}

.tag:visited {
    color: #fff;
}

.tag:hover {
    background: #444;
}

.related-videos {
    contain: content;
    margin: 20px;
}

.related-videos h2 {
    color: #fff;
    margin-bottom: 1rem;
}

/* Premium Overlay */
.premium-overlay {
    position: relative;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 0.5rem;
    color: white;
    box-sizing: border-box;
}

.premium-content-box {
    margin: 0 auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    line-height: 1.4;
}

.premium-header p {
    color: #94a1b2;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
}

.premium-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.9rem;
}

.feature-item:hover {
    transform: translateX(5px);
}

.feature-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    fill: #feca57;
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 100%;
}

.unlock-button {
    border: 1px solid #000;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(90deg, #ff6b6b, #feca57);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.unlock-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 202, 87, 0.2);
}

.email-section {
    width: 100%;
    text-align: center;
}

.email-section p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: #94a1b2;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.email-input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.email-input:focus {
    outline: none;
    border-color: #feca57;
}

.verify-button {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.verify-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.manage-link {
    color: #94a1b2;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.manage-link:hover {
    color: #feca57;
}

/* Footer */
footer {
    background: #1a1a1a;
    padding: 2rem 0;
    border-top: 1px solid #333;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:visited {
    color: #999;
}

.footer-section a:hover {
    color: #ff6b6b;
}

.footer-section a:hover:visited {
    color: #ff6b6b;
}

.footer-section p {
    color: #666;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.error-message {
    text-align: center;
    padding: 3rem;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        flex-wrap: wrap;
    }

    .desktop-lang {
        display: none;
    }

    .nav-left {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo {
        flex: 1;
        order: 1;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .search-container {
        width: 100%;
        min-width: 100%;
        order: 3;
        margin-top: 0.5rem;
    }

    .search-form {
        width: 100%;
    }

    .desktop-nav {
        display: none;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .mobile-nav {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #1a1a1a;
        padding: 0;
        border-top: 1px solid #2a2a2a;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .mobile-nav.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .mobile-nav .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        border-bottom: 1px solid #2a2a2a;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }

    .content {
        padding: 1rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .pagination {
        gap: 0.5rem;
    }

    .pagination-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    .nav-arrow {
        font-size: 24px;
    }

    .video-info {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    .meta-info {
        flex-wrap: wrap;
    }

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

    @media (min-width: 640px) {
        .premium-overlay {
            padding: 1.5rem;
        }

        .premium-content-box {
            padding: 1.5rem;
            max-width: 500px;
        }

        .premium-header h2 {
            font-size: 1.5rem;
        }

        .input-group {
            flex-direction: row;
        }

        .verify-button {
            width: 50%;
        }
    }
}

