/* =============================================
   style.css | وبسایت رسمی یاسین شبانی
   نسخه نهایی - v7 با قابلیت تم روشن/تاریک
   ============================================= */

/* ========== فونت‌های دیجی (محلی) ========== */
@font-face {
    font-family: 'Digi Titr';
    src: url('/fonts/Digi Titr Plus Bold Rectangle.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Digi Titr Line';
    src: url('/fonts/Digi Titr Plus Bold Line.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Digi Titr Circle';
    src: url('/fonts/Digi Titr Plus Bold Circle.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Digi Mitra';
    src: url('/fonts/Digi Mitra Rectangle Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Digi Mitra Circle';
    src: url('/fonts/Digi Mitra Circle Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ========== متغیرهای تم (حالت تاریک - پیش‌فرض) ========== */
:root {
    /* رنگ‌های اصلی */
    --primary-dark: #050b14;
    --primary-blue: #2b6ef0;
    --primary-blue-glow: #3b82f6;
    --primary-purple: #a855f7;
    --primary-gold: #f5b042;
    
    /* متن */
    --text-light: #f0f3fc;
    --text-muted: #b9d0f0;
    --text-dark: #1e293b;
    
    /* پس‌زمینه */
    --bg-gradient-start: #0a1020;
    --bg-gradient-end: #03050b;
    --glass-bg: rgba(8, 18, 32, 0.55);
    --glass-border: rgba(72, 187, 255, 0.3);
    --card-bg: rgba(12, 22, 40, 0.7);
    
    /* افکت‌ها */
    --transition-slow: all 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --transition-medium: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    --shadow-elevated: 0 25px 45px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    --shadow-gold: 0 0 30px rgba(245, 176, 66, 0.2);
}

/* ========== حالت روشن ========== */
body.light-mode {
    --primary-dark: #f0f4f8;
    --text-light: #1e293b;
    --text-muted: #475569;
    --text-dark: #0f172a;
    --bg-gradient-start: #e2e8f0;
    --bg-gradient-end: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(59, 130, 246, 0.4);
    --card-bg: rgba(255, 255, 255, 0.85);
    --shadow-elevated: 0 25px 45px -12px rgba(0, 0, 0, 0.15);
}

body.light-mode .glass-panel,
body.light-mode .card,
body.light-mode .tweet-card,
body.light-mode .featured-card,
body.light-mode .note-card,
body.light-mode .top-note-card,
body.light-mode .comment-card {
    color: var(--text-dark);
}

body.light-mode .post-title,
body.light-mode .section-title,
body.light-mode .hero-title,
body.light-mode .tweet-title,
body.light-mode .featured-title,
body.light-mode .notes-title,
body.light-mode .top-title,
body.light-mode .challenge-title {
    background: linear-gradient(135deg, #1e293b, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

body.light-mode .tweet-content,
body.light-mode .post-content,
body.light-mode .note-excerpt,
body.light-mode .comment-text {
    color: #334155;
}

body.light-mode .tweet-name,
body.light-mode .note-title,
body.light-mode .top-note-title {
    color: #0f172a;
}

/* ========== دکمه تغییر تم ========== */
.theme-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--primary-blue-glow);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-elevated);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-blue-glow);
    box-shadow: var(--shadow-glow);
}

/* ========== دکمه‌های اشتراک‌گذاری ========== */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.share-btn {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 2rem;
}

.share-btn:hover {
    background: var(--primary-blue-glow);
    color: white;
    transform: translateY(-2px);
}

.share-btn.telegram:hover { background: #0088cc; }
.share-btn.twitter:hover { background: #1da1f2; }
.share-btn.whatsapp:hover { background: #25d366; }
.share-btn.email:hover { background: #6b7280; }

body.light-mode .share-btn {
    color: var(--text-dark);
}

/* ========== دکمه دانلود PDF ========== */
.pdf-btn {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.pdf-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* ========== تایمر معکوس چالش ========== */
.challenge-timer {
    background: linear-gradient(135deg, rgba(245, 176, 66, 0.15), rgba(212, 160, 23, 0.05));
    border-radius: 2rem;
    padding: 0.8rem 1.5rem;
    margin: 1rem 0;
    text-align: center;
    border: 1px solid rgba(245, 176, 66, 0.3);
}

.timer-display {
    font-size: 1.3rem;
    font-weight: bold;
    font-family: 'Digi Titr', system-ui, sans-serif;
    color: var(--primary-gold);
    direction: ltr;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.timer-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

.timer-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.challenge-expired .timer-display {
    color: #ef4444;
}

/* ========== کامنت‌های زنجیره‌ای ========== */
.comment-thread {
    margin-right: 2rem;
    padding-right: 1rem;
    border-right: 2px solid rgba(59, 130, 246, 0.3);
}

.comment-reply {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(59, 130, 246, 0.2);
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary-blue-glow);
    font-size: 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    transition: all 0.2s;
}

.reply-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(-3px);
}

.reply-form {
    display: none;
    margin-top: 0.8rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
}

.reply-form.active {
    display: block;
}

.reply-form input,
.reply-form textarea {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #2d4270;
    color: white;
}

body.light-mode .reply-form input,
body.light-mode .reply-form textarea {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

/* ========== استایل صفحه پست (تایمر و اشتراک) ========== */
.post-header-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 150, 255, 0.3);
}

.post-share-section {
    margin-top: 1rem;
}

/* ========== باقی استایل‌های قبلی (بدون تغییر) ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at 20% 30%, var(--bg-gradient-start), var(--bg-gradient-end));
    font-family: 'Digi Mitra', system-ui, 'Segoe UI', Tahoma, sans-serif;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 40%, rgba(45, 100, 200, 0.08), transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: divineBreath 12s infinite alternate;
}

body.light-mode::before {
    opacity: 0.3;
}

@keyframes divineBreath {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    opacity: 0.6;
    pointer-events: none;
}

.wrapper {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 4rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    border-radius: 2.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-elevated), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: var(--transition-slow);
}

.glass-panel:hover {
    border-color: var(--primary-blue-glow);
    box-shadow: 0 30px 50px -15px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

header {
    padding: 1.8rem 2rem;
    margin-bottom: 2.5rem;
}

.header-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.avatar {
    width: 85px !important;
    height: 85px !important;
    min-width: 85px;
    min-height: 85px;
    border-radius: 50% !important;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 100, 255, 0.4);
    transition: transform 0.3s ease;
    animation: subtleFloat 5s infinite ease-in-out;
    background: #2b6ef0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.avatar-img {
    width: 85px !important;
    height: 85px !important;
    min-width: 85px;
    min-height: 85px;
    object-fit: cover !important;
    display: block;
}

.avatar::after {
    content: '';
    position: absolute;
    width: 105%;
    height: 105%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent);
    animation: pulseRing 2.5s infinite;
    z-index: -1;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes subtleFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.title-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Digi Titr', system-ui, sans-serif;
    background: linear-gradient(135deg, #ffffff, #9acdff, #d9a7ff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    position: relative;
    display: inline-block;
}

.title-section h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
    border-radius: 3px;
}

.title-section p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    border-right: 3px solid var(--primary-blue-glow);
    padding-right: 1rem;
}

.social-links a {
    color: #b9ceff;
    font-size: 1.7rem;
    margin-right: 1rem;
    transition: all 0.25s ease;
    display: inline-block;
}

.social-links a:hover {
    color: white;
    transform: translateY(-4px) scale(1.1);
    text-shadow: 0 0 12px var(--primary-blue-glow);
}

.nav-3d {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 2.5rem;
}

.nav-btn {
    background: rgba(25, 40, 65, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(72, 187, 255, 0.5);
    padding: 0.7rem 1.9rem;
    border-radius: 3rem;
    font-weight: 600;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.25s;
    font-size: 1rem;
    text-decoration: none;
    color: #eef5ff;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    transition: width 0.4s, height 0.4s;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.nav-btn:hover::before {
    width: 200px;
    height: 200px;
}

.nav-btn:hover {
    background: var(--primary-blue-glow);
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -10px #1e40af;
    border-color: #fff;
}

.section {
    display: none;
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1), transform 0.5s ease;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: riseUp 0.8s forwards;
}

@keyframes riseUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #9acdff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
}

.section-title i {
    margin-left: 0.5rem;
    color: var(--primary-blue-glow);
}

.hero-section {
    padding: 2.5rem;
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1rem;
}

.hero-quote {
    font-size: 1.4rem;
    font-family: 'Digi Titr Line', system-ui, sans-serif;
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 1.8rem;
    padding: 1.8rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: var(--transition-medium);
    box-shadow: 0 15px 30px -12px black;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(59, 130, 246, 0.08), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.card:hover::after {
    transform: translateX(100%);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue-glow);
    background: rgba(25, 45, 75, 0.85);
}

.card i {
    font-size: 2.4rem;
    background: linear-gradient(145deg, #60a5fa, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.4rem;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    margin-bottom: 0.6rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue-glow), var(--primary-purple));
    border-radius: 10px;
    animation: fillProgress 1.2s ease-out forwards;
}

@keyframes fillProgress {
    from { width: 0; }
    to { width: var(--target-width, 90%); }
}

.skill-tag {
    background: rgba(59, 130, 246, 0.2);
    border-radius: 2rem;
    padding: 0.4rem 1.2rem;
    font-size: 0.85rem;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    border: 0.5px solid var(--primary-blue-glow);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.2rem;
    transition: all 0.25s;
}

.skill-tag:hover {
    background: rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

.about-container {
    padding: 2rem;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.about-tags {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.book-item {
    text-align: center;
}

.book-cover {
    width: 100%;
    height: 160px;
    background: linear-gradient(145deg, #111c2e, #020a16);
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.book-item:hover .book-cover {
    transform: scale(1.02);
    border-color: var(--primary-blue-glow);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.book-publisher {
    font-size: 0.8rem;
    color: var(--primary-gold);
    margin: 0.3rem 0;
}

.isbn {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 0.5rem;
}

.article-meta {
    font-size: 0.75rem;
    color: var(--primary-gold);
    margin-bottom: 0.8rem;
    direction: ltr;
    text-align: right;
}

.read-more {
    color: var(--primary-blue-glow);
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 0.3rem;
}

.read-more:hover {
    text-decoration: underline;
}

.abstract {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
}

.btn-group {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-small {
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-small.civilica { background: #1a5276; color: white; }
.btn-small.civilica:hover { background: #2471a3; transform: translateY(-2px); }

.btn-small.elmnet { background: #2c3e50; color: white; }
.btn-small.elmnet:hover { background: #1a252f; transform: translateY(-2px); }

.btn-small.isic { background: #4a235a; color: white; }
.btn-small.isic:hover { background: #6c3483; transform: translateY(-2px); }

.profile-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.profile-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-btn.civilica { background: #1a5276; color: white; }
.profile-btn.elmnet { background: #2c3e50; color: white; }
.profile-btn.isic { background: #4a235a; color: white; }
.profile-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }

.news-ticker {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 3rem;
    margin: 1rem 0 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(59, 130, 246, 0.4);
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ticker-label {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    padding: 0.3rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: bold;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 42px;
}

.ticker-track {
    display: flex;
    flex-direction: column;
    position: relative;
    animation: scrollTicker 22s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    padding: 0.6rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e2e8f0;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
}

.ticker-item:hover {
    color: var(--primary-blue-glow);
    transform: translateX(-5px);
}

@keyframes scrollTicker {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.tweets-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tweet-title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, #fff, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-right: 3px solid #3b82f6;
    padding-right: 1rem;
}

.tweet-card {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 1.2rem;
    padding: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
}

.tweet-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #3b82f6;
}

.tweet-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.tweet-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2b6ef0, #a855f7);
    flex-shrink: 0;
}

.tweet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tweet-name {
    font-weight: bold;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    color: white;
}

.tweet-username {
    font-size: 0.7rem;
    color: #8ba3cf;
    direction: ltr;
    display: inline-block;
}

.tweet-date {
    font-size: 0.6rem;
    color: #6b85a3;
}

.tweet-content {
    margin: 0.5rem 0 0.5rem 2.8rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.tweet-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-right: 2.8rem;
}

.tweet-action-btn {
    background: none;
    border: none;
    color: #8ba3cf;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tweet-action-btn:hover {
    color: #3b82f6;
}

.tweet-action-btn.liked {
    color: #f472b6;
}

.featured-notes-section {
    margin: 2rem 0;
}

.featured-title {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, var(--primary-gold));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-right: 3px solid var(--primary-gold);
    padding-right: 1rem;
}

.featured-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(168, 85, 247, 0.08));
    border-radius: 1.8rem;
    padding: 1.8rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(245, 176, 66, 0.4);
    box-shadow: 0 15px 35px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(245, 176, 66, 0.1) inset;
    transition: all 0.4s;
}

.featured-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-gold);
    box-shadow: 0 25px 45px -15px rgba(0, 0, 0, 0.5), var(--shadow-gold);
}

.featured-card .post-title {
    font-size: 1.6rem;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 0.5rem;
}

.featured-card .post-content-preview {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.featured-card .post-content-preview img {
    max-width: 100%;
    border-radius: 0.8rem;
    margin: 0.5rem 0;
}

.featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-gold), #d4a017);
    color: #0a1020;
    font-size: 0.7rem;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    margin-bottom: 0.8rem;
    font-weight: bold;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
}

.action-group {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    font-size: 0.85rem;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    backdrop-filter: blur(4px);
}

.action-btn:hover {
    background: var(--primary-blue-glow);
    color: white;
    transform: translateY(-2px);
    border-color: var(--primary-blue-glow);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.action-btn.liked {
    background: #f472b6;
    color: white;
    border-color: #f472b6;
}

.top-notes-section {
    margin: 2rem 0;
}

.top-title {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #60a5fa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.top-notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.top-note-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.top-note-card:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: #3b82f6;
    transform: translateX(-5px);
}

.top-note-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #f5b042;
    min-width: 35px;
    text-align: center;
}

.top-note-content {
    flex: 1;
}

.top-note-title {
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    color: white;
}

.top-note-likes {
    font-size: 0.7rem;
    color: #f472b6;
    margin-top: 0.2rem;
}

.notes-section {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(100, 150, 255, 0.3);
}

.notes-title {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Digi Titr', system-ui, sans-serif;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff, #9acdff);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.2rem;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
}

.note-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-blue-glow);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.4);
}

.note-thumbnail {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 0.8rem;
    margin-bottom: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.note-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.note-thumbnail i {
    font-size: 2.5rem;
    color: var(--primary-blue-glow);
}

.note-title {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: #fff;
    font-weight: 600;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
}

.note-excerpt {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 1;
    line-height: 1.5;
}

.note-date {
    font-size: 0.7rem;
    color: var(--primary-gold);
    margin-top: 0.5rem;
}

.read-more-link {
    color: var(--primary-blue-glow);
    font-size: 0.8rem;
    margin-top: 0.8rem;
    display: inline-block;
    transition: all 0.2s;
}

.read-more-link:hover {
    transform: translateX(-3px);
    text-shadow: 0 0 5px var(--primary-blue-glow);
}

.posts-loading {
    min-height: 200px;
}

.loading-state {
    padding: 2rem;
    text-align: center;
}

.admin-link {
    text-align: center;
    margin-top: 2rem;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.8rem 0;
}

.contact-badge {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 2rem;
    padding: 0.6rem 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.9rem;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    border: 1px solid var(--primary-blue-glow);
    transition: all 0.25s;
}

.contact-badge:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.contact-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

input, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2d4270;
    border-radius: 1.2rem;
    color: white;
    font-family: 'Digi Mitra', system-ui, sans-serif;
    transition: all 0.25s;
}

body.light-mode input,
body.light-mode textarea {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    border-color: #cbd5e1;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-blue-glow);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    background: rgba(20, 40, 65, 0.6);
}

.btn-glow {
    background: linear-gradient(95deg, var(--primary-blue-glow), #6d28d9);
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 2rem;
    font-weight: bold;
    font-family: 'Digi Mitra Circle', system-ui, sans-serif;
    color: white;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-glow:hover {
    transform: scale(0.98);
    box-shadow: 0 0 25px var(--primary-blue-glow);
}

.form-status {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    color: #99f6e4;
}

.toast-msg {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #1e293b;
    border: 1px solid #3b82f6;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    z-index: 1000;
    animation: fadeOut 3s forwards;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.light-mode .toast-msg {
    background: #ffffff;
    color: var(--text-dark);
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); visibility: hidden; }
}

footer {
    margin-top: 4rem;
    text-align: center;
    border-top: 1px solid rgba(100, 150, 255, 0.3);
    padding: 2rem;
    font-size: 0.85rem;
    color: #8ba3cf;
}

.footer-quote {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    font-family: 'Digi Titr Line', system-ui, sans-serif;
    color: var(--primary-gold);
    font-style: italic;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .wrapper {
        padding: 1rem 1.2rem 3rem;
    }
    
    .header-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .title-section p {
        border-right: none;
        text-align: center;
        padding-right: 0;
    }
    
    .avatar {
        width: 70px !important;
        height: 70px !important;
    }
    
    .avatar-img {
        width: 70px !important;
        height: 70px !important;
    }
    
    .title-section h1 {
        font-size: 1.8rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-quote {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .profile-links {
        flex-direction: column;
        align-items: center;
    }
    
    .profile-btn {
        width: 80%;
        justify-content: center;
    }
    
    .featured-card {
        padding: 1.2rem;
    }
    
    .featured-card .post-title {
        font-size: 1.4rem;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .ticker-label {
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }
    
    .ticker-item {
        font-size: 0.8rem;
    }
    
    .top-notes-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .timer-display {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 0.8rem;
    }
    
    .card {
        padding: 1.2rem;
    }
    
    .book-cover {
        height: 120px;
        font-size: 2rem;
    }

    .btn-group {
        flex-direction: column;
    }
    
    .btn-small {
        justify-content: center;
    }
    
    .action-group {
        justify-content: center;
    }
    
    .ticker-wrapper {
        gap: 0.5rem;
    }
    
    .ticker-content {
        height: 36px;
    }
    
    .tweet-content {
        margin-right: 0;
    }
    
    .tweet-actions {
        margin-right: 0;
        justify-content: flex-start;
    }

    .comment-thread {
        margin-right: 1rem;
        padding-right: 0.5rem;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a1020;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue-glow), var(--primary-purple));
    border-radius: 10px;
}

::selection {
    background: rgba(59, 130, 246, 0.4);
    color: white;
}

.card {
    animation: cardFadeIn 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}