﻿/* ... کدهای قبلی ... */

/* *** استایل‌های جدید برای صفحه شروع (Overlay) *** */

.start-overlay {
    position: absolute; /* روی تمام عناصر قرار می‌گیرد */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* پس‌زمینه مشکی شفاف */
    z-index: 999; /* اولویت نمایش بالا */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    backdrop-filter: blur(5px); /* افکت مات شدن پشت صفحه (اختیاری) */
    border-radius: 30px; /* هماهنگی با گوشه‌های صفحه موبایل */
}

.overlay-content {
    padding: 30px;
    direction: rtl;
    animation: fadeInUp 0.5s ease-out;
}

.overlay-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #4fa9e3; /* رنگ آبی روشن */
}

.overlay-text {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #e0e0e0;
}

.btn-start-chat {
    padding: 12px 40px;
    background: linear-gradient(45deg, #4fa9e3, #2b3a42);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(79, 169, 227, 0.4);
}

    .btn-start-chat:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(79, 169, 227, 0.6);
    }

    .btn-start-chat:active {
        transform: translateY(1px);
    }

/* انیمیشن ساده برای ورود محتوا */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* اصلاح کوچک برای کانتینر اصلی */
.smartphone-screen {
    /* اطمینان از اینکه المان‌های absolute داخل این کانتینر محدود می‌شوند */
    position: relative;
}


/* شبیه‌ساز موبایل */
.tg-device-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a1a;
}

.tg-smartphone {
    width: 380px;
    height: 780px;
    background: #000;
    border-radius: 40px;
    padding: 10px;
    border: 4px solid #333;
}

.tg-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    overflow: hidden;
    background: #538bb4 url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-blend-mode: multiply;
    background-size: cover;
}

/* هدر */
.tg-header {
    height: 150px;
}

.tg-header-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(rgba(0,0,0,0.6), transparent);
}

.bot-avatar {
    width: 35px;
    height: 35px;
    background: #40a7e3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* حباب‌های پیام تلگرامی */
.tg-bubble {
    padding: 6px 10px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    position: relative;
}

    .tg-bubble.bot {
        background: white;
        color: #000;
        border-bottom-left-radius: 4px;
    }

    .tg-bubble.user {
        background: #eff7ff;
        color: #000;
        border-bottom-right-radius: 4px;
    }

.tg-meta {
    font-size: 0.65rem;
    margin-top: -2px;
    margin-left: 8px;
}

.tg-time {
    color: #a0a0a0;
}

.tg-tick {
    color: #4fa9e3;
    font-size: 0.8rem;
}

/* فوتر تلگرامی */
.tg-footer {
    background: white;
}

.tg-input-container {
    background: #f4f4f5;
    border-radius: 20px;
}

    .tg-input-container input:focus {
        outline: none;
    }

.tg-send-btn {
    background: none;
    color: #4fa9e3;
    font-size: 1.5rem;
    transition: transform 0.2s;
}

    .tg-send-btn:active {
        transform: scale(0.9);
    }

/* نشانگر تایپ */
.tg-typing {
    color: white;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

    .tg-typing span {
        animation: tg-dots 1.5s infinite;
        opacity: 0;
    }

        .tg-typing span:nth-child(1) {
            animation-delay: 0s;
        }

        .tg-typing span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .tg-typing span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes tg-dots {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.date-badge {
    background: rgba(0,0,0,0.2);
    color: white;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 10px;
    width: fit-content;
}
