/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    background-color: #fafafa;
    color: #262626;
    max-width: 100vw;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 100;
    border-bottom: 1px solid #dbdbdb;
}

.header-inner {
    max-width: 935px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-inner .logo {
    display: flex;
    align-items: center;
}

.header-inner .logo img {
    height: 35px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* دکمه بازگشت */
.back-btn {
    background: none;
    border: none;
    color: #262626;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.back-btn:hover {
    opacity: 0.7;
}

.back-btn span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* آیکون‌های هدر */
.header-icons {
    display: flex;
    gap: 20px;
    font-size: 1.4rem;
}

.header-icons a {
    color: #262626;
    text-decoration: none;
    transition: opacity 0.2s;
}

.header-icons a:hover {
    opacity: 0.7;
}

/* جستجو در هدر */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #efefef;
    border-radius: 50px;
    padding: 8px 16px;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}

.search-bar i {
    color: #8e8e8e;
    font-size: 0.9rem;
}

.search-bar input {
    background: none;
    border: none;
    color: #262626;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.search-bar input::placeholder {
    color: #8e8e8e;
}

/* ============================================================
   BOTTOM NAVIGATION (مثل اکسپلور - تم سفید)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #dbdbdb;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bottom-nav a {
    color: #8e8e8e;
    text-decoration: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.bottom-nav a i {
    transition: transform 0.2s ease;
}

.bottom-nav a:hover {
    color: #262626;
}

.bottom-nav a:active i {
    transform: scale(0.9);
}

.bottom-nav a.active {
    color: #0095f6;
}

.bottom-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #0095f6;
    border-radius: 50%;
}

/* انیمیشن Tap */
.bottom-nav a.tap-animation i {
    animation: navTap 0.3s ease;
}

@keyframes navTap {
    0% { transform: scale(1); }
    50% { transform: scale(0.8); }
    100% { transform: scale(1); }
}

/* ============================================================
   DESKTOP: Bottom Nav as Sidebar
   ============================================================ */
@media (min-width: 769px) {
    body {
        padding-bottom: 0;
        padding-left: 80px;
    }

    .bottom-nav {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: 75px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 0;
        padding-top: 80px;
        border-top: none;
        border-right: 1px solid #dbdbdb;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
        transition: transform 0.3s ease;
        background: #ffffff;
    }

    .bottom-nav a {
        font-size: 1.4rem;
        padding: 15px;
        width: 100%;
        margin: 2px 0;
        color: #8e8e8e;
    }

    .bottom-nav a:hover {
        background-color: #fafafa;
        border-radius: 0;
        color: #262626;
    }

    .bottom-nav a.active {
        color: #0095f6;
    }

    .bottom-nav a.active::after {
        bottom: auto;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 20px;
        border-radius: 0 4px 4px 0;
        background: #0095f6;
    }

    .bottom-nav a:last-child {
        margin-top: auto;
        margin-bottom: 20px;
    }
}

/* ============================================================
   MOBILE: Bottom Nav
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        padding: 6px 0;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
        border-radius: 0;
        box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
        background: #ffffff;
    }

    .bottom-nav a {
        font-size: 1.3rem;
        padding: 6px 10px;
        color: #8e8e8e;
    }

    .bottom-nav a.active {
        color: #0095f6;
    }

    .bottom-nav a.active::after {
        width: 5px;
        height: 5px;
        bottom: -2px;
    }

    .header-inner {
        padding: 8px 12px;
    }

    .header-icons {
        gap: 12px;
        font-size: 1.2rem;
    }

    .back-btn {
        font-size: 1.2rem;
    }

    .back-btn span {
        font-size: 0.8rem;
    }

    .search-bar {
        padding: 6px 12px;
        max-width: 100%;
    }

    .search-bar input {
        font-size: 0.8rem;
    }
}

/* ============================================================
   PROFILE PAGE (doctor_page.html)
   ============================================================ */
.profile-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 30px 20px 20px;
}

.profile-header {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.profile-avatar {
    flex-shrink: 0;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #dbdbdb;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #ffffff;
}

.profile-info {
    flex: 1;
}

.profile-name {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.profile-name h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #262626;
}

.specialization {
    background-color: #efefef;
    color: #8e8e8e;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid #dbdbdb;
}

.profile-stats {
    display: flex;
    gap: 35px;
    margin-bottom: 15px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-weight: 600;
    font-size: 1.1rem;
    color: #262626;
}

.stat-label {
    color: #8e8e8e;
    font-size: 0.8rem;
}

.profile-bio {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #262626;
}

.profile-bio .clinic-address {
    color: #8e8e8e;
    font-size: 0.9rem;
    margin-top: 5px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* دکمه‌ها */
.btn-primary {
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background-color: #1877f2;
}

.btn-secondary {
    background-color: transparent;
    color: #262626;
    border: 1px solid #dbdbdb;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    border-color: #8e8e8e;
    background-color: #fafafa;
}

.follow-btn {
    min-width: 120px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs-container {
    border-top: 1px solid #dbdbdb;
    margin-top: 20px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

.tab {
    background: none;
    border: none;
    color: #8e8e8e;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid transparent;
    margin-top: -1px;
}

.tab:hover {
    color: #262626;
}

.tab.active {
    color: #262626;
    border-top-color: #262626;
}

.tab i {
    font-size: 1rem;
}

.tab-content {
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.tab-pane {
    display: none;
    padding-top: 20px;
}

.tab-pane.active {
    display: block;
}

/* ============================================================
   GRID (پست‌ها و ریل‌ها)
   ============================================================ */
.posts-grid,
.reels-grid,
.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.grid-item,
.similar-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background-color: #fafafa;
    transition: transform 0.2s;
}

.grid-item:hover,
.similar-item:hover {
    transform: scale(1.02);
}

.grid-item img,
.grid-item video,
.similar-item img,
.similar-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.grid-item:hover img,
.grid-item:hover video,
.similar-item:hover img,
.similar-item:hover video {
    transform: scale(1.05);
}

/* پست متنی */
.text-only-post {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
}

.text-only-post h3 {
    color: white;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* نشانگر ویدیو و اسلاید */
.post-type-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffffff;
    z-index: 2;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #8e8e8e;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1rem;
}

.empty-state .btn-primary {
    margin-top: 15px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
    max-width: 600px;
    margin: 0 auto;
}

.about-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #dbdbdb;
}

.about-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #262626;
}

.about-section p {
    color: #262626;
    line-height: 1.8;
    font-size: 0.95rem;
}

.about-section p strong {
    color: #262626;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-links a {
    color: #0095f6;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 5px 12px;
    border: 1px solid #dbdbdb;
    border-radius: 20px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.social-links a:hover {
    border-color: #0095f6;
    background-color: rgba(0, 149, 246, 0.05);
}

/* ============================================================
   POST DETAIL PAGE (post_detail.html)
   ============================================================ */
.post-container {
    max-width: 935px;
    margin: 0 auto;
    padding: 0;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.post-main {
    display: flex;
    border-bottom: 1px solid #dbdbdb;
    flex: 1;
    min-height: 0;
    background: #ffffff;
}

/* بخش مدیا */
.post-media {
    flex: 1;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
}

.post-media img,
.post-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* کنترل‌های ویدیو */
.video-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-media:hover .video-controls,
.video-controls.always-show {
    opacity: 1;
}

.video-control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #dbdbdb;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.video-control-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* اسلایدر */
.media-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #262626;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.nav-btn.prev {
    right: 10px;
}

.nav-btn.next {
    left: 10px;
}

.dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.dot.active {
    background: #0095f6;
}

/* پست متنی بزرگ */
.text-only-post-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.text-only-post-large h2 {
    color: white;
    font-size: 1.5rem;
    line-height: 1.8;
}

/* بخش جزئیات پست */
.post-details {
    width: 400px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
}

/* هدر پست در detail */
.post-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #dbdbdb;
    gap: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    padding: 2px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.username-area {
    flex: 1;
    min-width: 0;
}

.username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #262626;
}

.username a {
    color: #262626;
    text-decoration: none;
}

.username a:hover {
    text-decoration: underline;
}

.specialty {
    font-size: 0.75rem;
    color: #8e8e8e;
    margin-top: 2px;
}

/* کامنت‌ها */
.comments-section {
    flex: 1 1 auto;
    overflow-y: visible;
    padding: 16px;
    border-bottom: 1px solid #dbdbdb;
    max-height: none;
}

.caption-comment {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffffff;
    overflow: hidden;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-username {
    font-weight: 600;
    font-size: 0.85rem;
    color: #262626;
    display: inline;
}

.comment-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 2px;
    display: inline;
    margin-right: 5px;
    color: #262626;
}

.comment-meta {
    font-size: 0.75rem;
    color: #8e8e8e;
    margin-top: 4px;
    display: flex;
    gap: 15px;
}

.no-comments {
    text-align: center;
    color: #8e8e8e;
    padding: 40px 20px;
}

.no-comments i {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

/* اکشن‌ها */
.actions-section {
    padding: 0 16px;
    border-bottom: 1px solid #dbdbdb;
}

.main-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 8px;
}

.left-actions {
    display: flex;
    gap: 16px;
    font-size: 1.5rem;
}

.left-actions i {
    cursor: pointer;
    transition: all 0.2s;
    color: #262626;
}

.left-actions i:hover {
    opacity: 0.7;
}

.left-actions .fa-heart.liked {
    color: #ed4956;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.right-actions {
    font-size: 1.5rem;
}

.right-actions i {
    cursor: pointer;
    transition: all 0.2s;
    color: #262626;
}

.right-actions i:hover {
    opacity: 0.7;
}

.right-actions .fa-bookmark.saved {
    color: #0095f6;
    font-weight: 900;
}

.likes-count {
    font-weight: 600;
    font-size: 0.9rem;
    padding-bottom: 8px;
    color: #262626;
    cursor: pointer;
}

.post-time-detail {
    font-size: 0.7rem;
    color: #8e8e8e;
    padding-bottom: 12px;
}

/* فرم کامنت */
.comment-form-section {
    padding: 16px;
    border-top: 1px solid #dbdbdb;
}

.comment-form-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-form-section input[type="text"],
.comment-form-section textarea {
    background: #fafafa;
    border: 1px solid #dbdbdb;
    color: #262626;
    outline: none;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 4px;
    width: 100%;
}

.comment-form-section input[type="text"]::placeholder,
.comment-form-section textarea::placeholder {
    color: #8e8e8e;
}

.comment-form-section textarea {
    resize: vertical;
    min-height: 60px;
}

.comment-form-section button {
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    align-self: flex-start;
}

.comment-form-section button:hover {
    background-color: #1877f2;
}

.login-to-comment {
    text-align: center;
    padding: 16px;
    color: #8e8e8e;
    font-size: 0.9rem;
}

.login-to-comment a {
    color: #0095f6;
    text-decoration: none;
    font-weight: 600;
}

.login-to-comment a:hover {
    text-decoration: underline;
}

/* ============================================================
   SIMILAR POSTS
   ============================================================ */
.similar-posts {
    max-width: 935px;
    margin: 30px auto;
    padding: 0 20px;
}

.similar-posts h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #8e8e8e;
}

/* ============================================================
   LOAD MORE
   ============================================================ */
.load-more {
    text-align: center;
    padding: 30px 20px;
}

.load-more button {
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.load-more button:hover {
    background-color: #1877f2;
}

.load-more button:disabled {
    background-color: #efefef;
    color: #8e8e8e;
    cursor: not-allowed;
}

/* ============================================================
   TOAST / NOTIFICATIONS
   ============================================================ */
#toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 450px;
    pointer-events: none;
}

.toast-message {
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: toastSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    width: 100%;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* رنگ‌بندی */
.toast-message.bg-green-600,
.toast-message.toast-success {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #ffffff !important;
}

.toast-message.bg-red-600,
.toast-message.toast-error {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: #ffffff !important;
}

.toast-message.bg-blue-600,
.toast-message.toast-info {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
}

.toast-message.toast-warning {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    color: #ffffff !important;
}

/* آیکون‌ها */
.toast-message::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 10px;
}

.toast-message.toast-success::before,
.toast-message.bg-green-600::before {
    content: '\f058';
}

.toast-message.toast-error::before,
.toast-message.bg-red-600::before {
    content: '\f057';
}

.toast-message.toast-info::before,
.toast-message.bg-blue-600::before {
    content: '\f05a';
}

.toast-message.toast-warning::before {
    content: '\f071';
}

/* دکمه بستن */
.toast-message::after {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 0.9rem;
}

.toast-message:hover::after {
    opacity: 1;
}

/* انیمیشن‌ها */
@keyframes toastSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-message.removing {
    animation: toastSlideUp 0.3s ease-in forwards;
}

@keyframes toastSlideUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* RTL support */
[dir="rtl"] .toast-message::before {
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .toast-message::after {
    left: auto;
    right: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    text-align: center;
    padding: 25px 20px;
    color: #8e8e8e;
    font-size: 0.75rem;
    border-top: 1px solid #dbdbdb;
    max-width: 935px;
    margin: 0 auto;
    background: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-links a {
    color: #8e8e8e;
    text-decoration: none;
    font-size: 0.75rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE - TABLET & MOBILE
   ============================================================ */
@media (max-width: 768px) {
    /* Profile */
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .profile-avatar img,
    .avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .avatar-placeholder {
        font-size: 2rem;
    }

    .profile-name {
        justify-content: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .profile-actions {
        justify-content: center;
    }

    .tabs {
        gap: 20px;
    }

    .tab {
        font-size: 0.75rem;
        padding: 12px 0;
    }

    .tab i {
        font-size: 0.85rem;
    }

    .posts-grid,
    .reels-grid,
    .similar-grid {
        gap: 2px;
    }

    .tab-content {
        padding: 0 5px 20px;
    }

    .about-content {
        padding: 0 10px;
    }

    /* Post Detail */
    body {
        overflow-y: auto;
        height: auto;
    }

    .post-container {
        height: auto;
        max-height: 100vh;
    }

    .post-main {
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
    }

    .post-media {
        height: 55vh;
        min-height: 300px;
        flex: none;
    }

    .post-details {
        width: 100%;
        max-width: 100%;
        flex: 1;
        overflow-y: auto;
        max-height: 45vh;
    }

    .video-controls {
        opacity: 1;
        bottom: 10px;
    }

    .video-control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .nav-btn {
        width: 25px;
        height: 25px;
        font-size: 0.7rem;
    }

    .nav-btn.prev {
        right: 5px;
    }

    .nav-btn.next {
        left: 5px;
    }

    .dots {
        bottom: 8px;
    }

    .dot {
        width: 5px;
        height: 5px;
    }

    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2px;
    }

    /* Toast */
    #toast-container {
        top: 70px;
        width: 92%;
        max-width: 100%;
    }

    .toast-message {
        padding: 12px 40px 12px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .toast-message::after {
        left: 10px;
        font-size: 0.8rem;
    }

    [dir="rtl"] .toast-message {
        padding: 12px 16px 12px 40px;
    }

    [dir="rtl"] .toast-message::after {
        right: 10px;
        left: auto;
    }
}

@media (max-width: 480px) {
    .profile-avatar img,
    .avatar-placeholder {
        width: 80px;
        height: 80px;
    }

    .avatar-placeholder {
        font-size: 1.5rem;
    }

    .profile-name h1 {
        font-size: 1.2rem;
    }

    .profile-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 0.95rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.8rem;
        padding: 6px 14px;
    }

    .tabs {
        gap: 12px;
    }

    .tab {
        font-size: 0.7rem;
        padding: 10px 0;
    }

    .post-media {
        height: 50vh;
        min-height: 250px;
    }

    .post-details {
        max-height: 50vh;
    }

    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1px;
    }
}

/* ============================================================
   HEART ANIMATION (مانند اکسپلور)
   ============================================================ */
.heart-animation {
    position: fixed;
    font-size: 120px;
    color: #ff3040;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: heartPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-shadow: 0 0 40px rgba(255, 48, 64, 0.4);
    user-select: none;
    -webkit-user-select: none;
}

.heart-animation .fa-heart {
    display: block;
    animation: heartPulse 0.8s ease forwards;
}

@keyframes heartPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-15deg);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1.5) rotate(8deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(0.95) rotate(-5deg);
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -50%) scale(1.2) rotate(3deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0;
    }
}

@keyframes heartPulse {
    0% { transform: scale(0); opacity: 0; }
    20% { transform: scale(1.4); opacity: 1; }
    40% { transform: scale(0.85); opacity: 1; }
    60% { transform: scale(1.15); opacity: 1; }
    80% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.heart-small {
    position: fixed;
    font-size: 60px;
    color: #ff3040;
    z-index: 99999;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    animation: heartPopSmall 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-shadow: 0 0 30px rgba(255, 48, 64, 0.3);
    user-select: none;
    -webkit-user-select: none;
}

.heart-small .fa-heart {
    display: block;
    animation: heartPulseSmall 0.6s ease forwards;
}

@keyframes heartPopSmall {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1.3) rotate(5deg);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9) rotate(-3deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 0;
    }
}

@keyframes heartPulseSmall {
    0% { transform: scale(0); opacity: 0; }
    30% { transform: scale(1.3); opacity: 1; }
    60% { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.heart-rain {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    font-size: 20px;
    color: #ff3040;
    animation: heartRain 1.5s ease forwards;
    user-select: none;
    -webkit-user-select: none;
}

@keyframes heartRain {
    0% {
        transform: translateY(0) scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-250px) scale(1.8) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    color: transparent !important;
}

.skeleton-text {
    display: inline-block;
    min-width: 100px;
    height: 1rem;
}

.skeleton-avatar {
    border-radius: 50%;
    width: 35px;
    height: 35px;
}