* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    font-family: 'Alexandria', 'Lexend', sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Header Section */
.header-section {
    text-align: center;
    background: rgba(30, 41, 59, 0.9);
    padding: 40px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(15px);
    min-height: 200px;
    width: calc(100% + 40px);
    margin: 0 -20px;
    box-sizing: border-box;
}

.header-section h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typing Animation */
.typing-animation {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin: 0 0 25px 0;
    line-height: 1.6;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.typing-animation::after {
    content: '|';
    color: #38bdf8;
    animation: blink 1s infinite;
    font-weight: bold;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Bot Card */
.bot-card-mini {
    background: rgba(30, 41, 59, 0.9);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 250px;
    max-width: 320px;
}

.bot-card-mini:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.5);
}

/* Active Bot Styling */
.bot-card-mini.active-bot {
    border-color: rgba(34, 197, 94, 0.6);
    background: rgba(15, 23, 42, 0.95);
}

.bot-card-mini.active-bot:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.8);
}

/* Coming Soon Bot Styling */
.bot-card-mini.coming-soon {
    opacity: 0.7;
    border-color: rgba(156, 163, 175, 0.3);
    background: rgba(15, 23, 42, 0.6);
}

.bot-card-mini.coming-soon:hover {
    opacity: 0.8;
    border-color: rgba(156, 163, 175, 0.4);
    transform: translateY(-2px);
}

/* Bot Avatar */
.bot-avatar-mini {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 15px;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3);
}

.bot-card-mini h3 {
    color: #f1f5f9;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.bot-card-mini p {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Features */
.bot-features-mini {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bot-feature-mini {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid rgba(56, 189, 248, 0.2);
    font-weight: 500;
}

/* Buttons */
.chat-btn-mini {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: 0 2px 6px rgba(56, 189, 248, 0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-btn-mini:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

/* Telegram Button */
.telegram-btn {
    background: linear-gradient(135deg, #0088cc, #229ED9) !important;
    color: white !important;
    border: none !important;
    text-decoration: none !important;
}

.telegram-btn:hover {
    background: linear-gradient(135deg, #006699, #1a7db8) !important;
    transform: translateY(-2px);
}

.telegram-btn i {
    margin-right: 8px;
}

/* Disabled Button */
.chat-btn-mini.disabled {
    background: rgba(107, 114, 128, 0.3) !important;
    color: rgba(156, 163, 175, 0.8) !important;
    cursor: not-allowed !important;
    border: 1px solid rgba(107, 114, 128, 0.2) !important;
}

.chat-btn-mini.disabled:hover {
    transform: none !important;
    background: rgba(107, 114, 128, 0.3) !important;
}

/* Carousel */
.bot-carousel-container {
    margin: 15px -20px -10px -20px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 20px;
    padding: 30px 40px 20px 40px;
    border: 1px solid rgba(56, 189, 248, 0.2);
    backdrop-filter: blur(15px);
    width: calc(100% + 40px);
}

.bot-carousel {
    overflow: hidden;
    border-radius: 15px;
    touch-action: pan-x pinch-zoom;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    -webkit-tap-highlight-color: transparent;
}

.bot-slides-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bot-slides-container::-webkit-scrollbar {
    display: none;
}

.bot-slide {
    min-width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 25px;
    padding: 10px 0;
    flex-wrap: nowrap;
    align-items: stretch;
    scroll-snap-align: start;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Footer */
.footer {
    background: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    text-align: center;
    padding: 6px 40px;
    border-top: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 20px;
    margin: -5px -20px 0 -20px;
    width: calc(100% + 40px);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
}

.footer-content p {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.2;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    text-decoration: none;
}

.social-links a:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

/* Glass Button */
.glass-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.3);
}

.glass-btn:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.4);
}

/* Carousel Header */
.carousel-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.carousel-controls {
    display: none;
}

.carousel-header h2 {
    color: #f1f5f9;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header-section {
        margin: 0 -10px;
        width: calc(100% + 20px);
        padding: 30px 20px;
    }

    .header-section h1 {
        font-size: 1.8rem;
    }

    .bot-carousel-container {
        margin: 15px -10px -10px -10px;
        width: calc(100% + 20px);
        padding: 30px 20px 20px 20px;
    }

    .bot-slide {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .bot-card-mini {
        width: calc(50% - 10px);
        min-width: 250px;
        max-width: none;
    }

    .footer {
        margin: 0 -10px 0 -10px;
        width: calc(100% + 20px);
        padding: 6px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header-section {
        margin: 0 -5px;
        width: calc(100% + 10px);
        padding: 25px 15px;
    }

    .header-section h1 {
        font-size: 1.5rem;
    }

    .glass-btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        gap: 8px;
    }

    .bot-carousel-container {
        margin: 15px 0 -10px 0;
        width: 100%;
        padding: 20px 15px 10px 15px;
    }

    .bot-slide {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .bot-card-mini {
        width: 100%;
        max-width: 300px;
    }

    .footer {
        margin: 0 -5px 10px -5px;
        width: calc(100% + 10px);
        padding: 6px 15px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .bot-card-mini {
        transform: none !important;
    }
}
