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

body {
    background-color: #111111;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.vazir_font {
    font-family: "Vazirmatn", sans-serif;
}

.inter_font {
    font-family: 'Inter', sans-serif;
}

@media only screen and (max-width: 2000px) and (min-width: 451px) {
    .footer-nav {
        max-width: 450px;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        border-left: 1px solid rgba(255, 255, 255, 0.050);
        border-right: 1px solid rgba(255, 255, 255, 0.050);
    }

    .footer-nav .container {
        max-width: 450px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media only screen and (max-width: 450px) {
    .footer-nav {
        max-width: none;
        margin: 0;
        left: 0;
        right: 0;
    }

    .footer-nav .container {
        max-width: none;
        margin: 0;
    }
}


html {
    scroll-behavior: smooth;
}

.post-item {
    scroll-margin-top: 200px;
}

.font_inter {
    font-family: 'Inter', sans-serif;
}

.footer-nav {
    position: fixed;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #111111;
    backdrop-filter: blur(8px);
    padding: 0 1.5rem;
    padding-top: 0.8rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 -2px 25px rgba(0, 0, 0, 0.555);
    transition: opacity 0.3s ease;
    opacity: 1;
}

.footer-nav .container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.footer-nav .container a {
    color: white;
    text-decoration: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.vote-form .vote-btn:hover {
    animation-name: active_vote_btn;
    animation-duration: 2s;
}

@keyframes active_vote_btn {
    0% {
        background-color: white;
        color: #181818;

    }

    25% {
        background-color: white;
        color: #181818;
    }

    50% {
        background-color: #ffffff25;
        color: white;
    }

    100% {
        background-color: #ffffff25;
        color: white;
    }
}

.vote-form .vote-btn:hover .icon {
    animation: ease_in_out_icon;
    animation-duration: 1s;
}

@keyframes ease_in_out_icon {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4) rotate(-10deg);
        margin-right: 3px;
    }

    100% {
        transform: scale(1);
    }
}

.category-link {
    transition: all 0.5s;
}

.category-link:hover {
    border: 1px solid white;
}

.post-item {
    position: relative;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.pinned-scroll-container {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.pinned-scroll-content {
    display: flex;
    gap: 16px;
}

.pinned-item {
    scroll-snap-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.pinned-item:focus,
.pinned-item.active {
    transform: scale(1.05);
    border-radius: 0;
    opacity: 1;
}

.pinned-item:not(:focus):not(.active) {
    opacity: 0.7;
    transform: scale(0.95);
}

#toggle-text {
    text-align: center;
    color: #ccc;
    font-size: 12.5px;
}

#toggle-text span {
    cursor: pointer;
    margin-left: 4px;
    text-decoration: none;
    white-space: nowrap;
}

#toggle-text button {
    background: none;
    border: none;
    color: #3b5998;
    font-weight: bold;
    cursor: pointer;
}

.spoiler {
    position: relative;
    color: transparent;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 4px 4px;
    cursor: pointer;
    transition: color 0.5s ease-in-out, background 0.5s ease-in-out;
}

.spoiler.revealed {
    color: inherit;
    background: none;
}

.background {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(to right, #2b2b2b, #1e1e1e);
}

.background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.08) 0 15px,
            transparent 15px 50px);
    animation: moveLines 10s linear infinite;
}

@keyframes moveLines {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.clickable-post {
    transition: all 0.3s ease;
    cursor: pointer;
}

.clickable-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.post-highlight {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0% {
        background-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }

    50% {
        background-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    }

    100% {
        background-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
}

#offline-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    user-select: none;
}

#offline-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

#offline-overlay .offline-card {
    width: 125px;
    height: 125px;
    background: url('images/loading.png') center/contain no-repeat;
    filter: drop-shadow(0 0px 30px rgba(255, 255, 255, 0.25));
    animation: pulse 2.5s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.92);
        opacity: 0.85;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.94);
        opacity: 0.9;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}