:root {
    --bg-dark: #0a0a0a;
    --text-main: #e0e0e0;
    --text-muted: #888;
    --accent: #ff3333;
    --accent-dim: rgba(255, 51, 51, 0.1);
    --font-main: 'Vazirmatn', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }
a {
    color: #ff3333a8;
}

@media (min-width: 769px) {
    body, a, button, .post-content, .feed-container {
        cursor: none !important;
    }
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    direction: rtl;
    line-height: 1.9;
}

.app-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    padding: 0 20px; display: flex; justify-content: space-between; align-items: center;
    z-index: 100; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
}
.app-header a { pointer-events: auto; }

.header-logo { height: 42px; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); transition: 0.3s; }
.header-logo:hover { transform: scale(1.05); }

.header-socials { display: flex; gap: 15px; }
.header-socials a { color: #aaa; font-size: 1.2rem; transition: 0.3s; }
.header-socials a:hover { color: #fff; transform: translateY(-2px); }

.feed-container {
    height: 100vh; width: 100%;
    overflow-y: scroll; scroll-snap-type: y mandatory; scroll-behavior: smooth;
    scrollbar-width: none;
}
.feed-container::-webkit-scrollbar { display: none; }

.post-screen {
    height: 100vh; width: 100%;
    scroll-snap-align: start; scroll-snap-stop: always;
    display: flex; justify-content: center; align-items: center;
    position: relative;
    background: var(--bg-dark) url('https://www.transparenttextures.com/patterns/black-felt.png');
    padding: 0;
}

.post-content {
    width: 100%; max-width: 650px;
    max-height: 85vh; overflow-y: auto;
    padding: 0 20px 40px 80px;
    text-align: right; z-index: 10;
    scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
}

.post-header { margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.post-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 300; }

.post-title {
    font-size: 1.4rem; font-weight: 800; color: #fff;
    line-height: 1.4; margin: 0;
    white-space: normal; word-wrap: break-word;
}

.post-body {
    font-size: 1.05rem;
    color: #dcdcdc;
    text-align: justify;
    white-space: pre-wrap;
    margin: 0 !important;
    padding: 0 !important;
}

.post-body > *:first-child { margin-top: 0 !important; padding-top: 0 !important; }

.hashtag {
    color: var(--accent); background: var(--accent-dim);
    padding: 2px 8px; border-radius: 12px; font-size: 0.9em;
    display: inline-block; margin: 0 2px; text-decoration: none;
}

.action-bar {
    position: absolute; left: 20px; bottom: 25%;
    display: flex; flex-direction: column; gap: 20px; z-index: 20; align-items: center;
}
.action-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(40,40,40,0.6); border: 1px solid rgba(255,255,255,0.1);
    color: #ccc; font-size: 1.3rem;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: 0.3s; backdrop-filter: blur(5px);
}
.action-btn:hover { background: rgba(255,255,255,0.15); color: #fff; transform: scale(1.1); }
.action-btn.active { background: rgba(255,51,51,0.15); border-color: var(--accent); color: var(--accent); }
.count { position: absolute; bottom: -20px; font-size: 0.75rem; color: #777; font-family: sans-serif; }

.home-screen { padding: 0 !important; }
.home-content {
    text-align: center !important; padding: 0 20px !important;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%;
}
.big-logo { width: 140px; height: auto; margin-bottom: 20px; opacity: 0.9; animation: floatLogo 6s infinite ease-in-out; }
.site-moto { color: #aaa; font-weight: 300; margin-top: 10px; }
.home-socials { margin-top: 20px; display: flex; gap: 20px; font-size: 1.5rem; color: #888; }
.home-socials a:hover { color: var(--accent); }

.btn-scroll-down {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 3rem;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
    color: #ccc; padding: 12px 30px; border-radius: 50px;
    font-size: 0.95rem; cursor: pointer; transition: 0.3s; backdrop-filter: blur(5px);
}
.btn-scroll-down:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }
.btn-scroll-down i { font-size: 0.8rem; animation: bounceArrow 2s infinite; }

@keyframes bounceArrow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.scroll-indicator { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); color: #444; font-size: 1.2rem; animation: bounceArrow 2s infinite; opacity: 0.6; pointer-events: none; }

#preloader { position: fixed; inset: 0; background: #000; z-index: 9999; display: flex; justify-content: center; align-items: center; }
.loader-dots { display: flex; gap: 10px; }
.dot { width: 12px; height: 12px; background: var(--accent); border-radius: 50%; animation: dotBounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes dotBounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

#ink-cursor { position: fixed; width: 15px; height: 15px; background: var(--accent); border-radius: 50%; pointer-events: none; z-index: 999; transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, background-color 0.3s; mix-blend-mode: exclusion; }
.ink-trail { position: fixed; width: 8px; height: 8px; background: rgba(255, 51, 51, 0.4); border-radius: 50%; pointer-events: none; z-index: 998; transform: translate(-50%, -50%); animation: fadeTrail 0.8s forwards; }
@keyframes fadeTrail { to { opacity: 0; transform: translate(-50%, -50%) scale(0); } }

@media (max-width: 768px) {
    #ink-cursor, .ink-trail { display: none !important; }
    .post-content { padding: 0 15px 60px 65px; font-size: 0.95rem; }
    .action-bar { left: 10px; bottom: 130px; }
}