@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.animate-fade-in {
    animation: fadeIn .4s ease-out forwards
}

:root {
    --bg-color: #0f1115;
    --card-bg: #1c1f26;
    --text-primary: #fff;
    --text-secondary: #a0a0a0;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --glass: rgba(28, 31, 38, .7);
    --border: rgba(255, 255, 255, .1)
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh
}

a {
    text-decoration: none;
    color: inherit;
    transition: color .2s
}

a:hover {
    color: var(--accent)
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px
}

.main-header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent
}

.logo img {
    max-height: 40px
}

.search-form {
    display: flex;
    background: #2a2d36;
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid var(--border)
}

.search-form input {
    background: 0 0;
    border: none;
    color: #fff;
    padding: 5px;
    outline: 0
}

.search-form button {
    background: 0 0;
    border: none;
    color: #aaa;
    cursor: pointer
}

.main-nav {
    background: #15181e;
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    overflow-x: auto;
    white-space: nowrap
}

.main-nav a {
    color: var(--text-secondary);
    margin-right: 20px;
    font-weight: 500;
    font-size: .95rem
}

.main-nav a:hover {
    color: #fff
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding-bottom: 40px
}

@media (max-width:768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px
    }

    .container {
        padding: 0 10px
    }
}

.card-item {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column
}

.poster {
    aspect-ratio: 4/5;
    overflow: hidden;
    position: relative;
    background: #222;
    width: 100%
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s
}

.info {
    padding: 12px;
    background: #1e1e1e;
    position: relative;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start
}

.info h3 {
    margin: 0;
    font-size: .85rem;
    line-height: 1.4;
    max-height: 2.8em;
    font-weight: 600;
    color: #f3f4f6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.views-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: .75rem;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    z-index: 2;
    font-weight: 500
}

.views-badge i {
    font-size: .75rem;
    color: #6366f1
}

.poster::after {
    content: '\f04b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, .9);
    opacity: 0;
    transition: all .3s;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .5));
    transform: translate(-50%, -50%) scale(.8)
}

.card-item:hover .poster::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1)
}

.fav-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    background: rgba(0, 0, 0, .4);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    opacity: 0;
    transform: scale(.8)
}

.card-item:hover .fav-btn {
    opacity: 1;
    transform: scale(1)
}

.fav-btn.active {
    color: #ff4757;
    opacity: 1;
    transform: scale(1);
    background: rgba(0, 0, 0, .6)
}

.fav-btn:hover {
    background: rgba(255, 71, 87, .2);
    color: #ff4757;
    transform: scale(1.1)
}

@media (max-width:768px) {
    .fav-btn {
        opacity: 1;
        transform: scale(1)
    }
}

.main-header {
    background: #0a0a0a;
    border-bottom: 1px solid #222
}

.search-form {
    background: #1a1a1a;
    border: none
}

.video-player-container {
    margin-top: 20px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #444
}

.video-player-container iframe {
    width: 100%;
    height: 500px;
    border: none
}

.post-details {
    margin-top: 20px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px
}

.meta {
    display: flex;
    gap: 15px;
    color: #888;
    margin-top: 10px
}

.tags-section {
    margin-top: 20px
}

.meta-row {
    margin-top: 10px
}

.tag {
    display: inline-block;
    background: #2a2d36;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: .85rem;
    margin-right: 5px;
    color: #ccc;
    transition: .2s
}

.tag:hover {
    background: var(--accent);
    color: #fff
}

.announcement-bar {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    color: #fff;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
    font-weight: 600;
    font-size: .9rem
}

@keyframes marquee {
    0% {
        transform: translate(0, 0)
    }

    100% {
        transform: translate(-100%, 0)
    }
}

.player-watermark {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0, 0, 0, .4);
    color: rgba(255, 255, 255, .5);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
    z-index: 20;
    pointer-events: none;
    backdrop-filter: blur(2px);
    user-select: none
}

.floating-telegram {
    position: fixed;
    bottom: 25px;
    right: 25px;
    left: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    animation: floatUp .5s ease-out
}

.telegram-btn {
    background: #fff;
    color: #0088cc;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 136, 204, .5);
    transition: transform .2s;
    text-decoration: none;
    animation: pulse 2s infinite;
    border: 2px solid #0088cc
}

.telegram-btn:hover {
    transform: scale(1.05);
    background: #0088cc;
    color: #fff
}

.telegram-icon {
    font-size: 1.8rem
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 136, 204, .7)
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 136, 204, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 136, 204, 0)
    }
}

@keyframes floatUp {
    from {
        transform: translateY(50px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}