/*
Theme Name: FutureTail TON
Theme URI: https://futuretail.ru
Description: Telegram-inspired тема для TON на Tailwind CSS
Version: 2.0
Author: FutureTail Team
*/

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    body {
        font-family: 'Rubik', sans-serif;
    }
}

@layer components {
    .chat-bubble {
        @apply bg-white rounded-[18px] p-4 shadow-md relative transition-all duration-300;
    }
    .chat-bubble:hover {
        @apply shadow-xl -translate-y-1;
        box-shadow: 0 4px 16px rgba(0,136,204,0.15);
    }
    .chat-bubble::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: -8px;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 0 12px 12px;
        border-color: transparent transparent white transparent;
    }
    .brand-logo {
        @apply w-12 h-12 bg-gradient-to-br from-[#0088cc] to-[#0066aa] rounded-2xl flex items-center justify-center transition-transform duration-300;
    }
    .brand-logo:hover {
        @apply scale-110 rotate-6;
    }
}

@layer utilities {
    .animate-slide-left {
        animation: slideInLeft 0.5s ease-out;
    }
    .animate-slide-right {
        animation: slideInRight 0.5s ease-out;
    }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* =====================
   Message Card
   ===================== */

.message-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 1.25rem;
    border: 1px solid #e8f4fd;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.message-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 136, 204, 0.18);
    border-color: #b3d9f0;
}

.message-card .card-avatar {
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-card:hover .card-avatar {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 136, 204, 0.45);
}

.message-card h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.message-card h3 a:hover {
    color: #0088cc;
}

.message-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.message-card .card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #f0f8ff;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #555;
    transition: background 0.2s, color 0.2s;
}

.message-card .card-meta span:hover {
    background: #0088cc;
    color: #fff;
}

.message-card .card-meta a {
    color: inherit;
    text-decoration: none;
}

.message-card .card-excerpt {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #444;
    padding: 0.875rem 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin: 0.75rem 0 0;
}

.message-card .card-excerpt p {
    margin: 0;
}

.message-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.875rem;
    margin-top: 0.875rem;
}

.message-card .card-reactions {
    display: flex;
    gap: 0.5rem;
}

.message-card .card-reactions span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    background: #f5f5f5;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.message-card .card-reactions span:hover {
    background: #e0f0fa;
    color: #0088cc;
}

.message-card .card-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #0088cc, #0066aa);
    color: #fff !important;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.message-card .card-read-btn:hover {
    box-shadow: 0 4px 14px rgba(0, 136, 204, 0.45);
    transform: translateX(2px);
}

/* =====================
   Prose — контент статьи
   ===================== */

.prose {
    color: #1a1a2e;
    font-size: 1.05rem;
    line-height: 1.85;
}

.prose h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0a0a1a;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #0088cc;
    line-height: 1.2;
}

.prose h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0a0a1a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0f0fa;
    padding-left: 0.75rem;
    border-left: 4px solid #0088cc;
}

.prose h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0088cc;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1.25rem;
}

.prose a {
    color: #0088cc;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s;
}

.prose a:hover {
    color: #0066aa;
}

.prose strong {
    color: #0a0a1a;
    font-weight: 700;
}

/* Списки */
.prose ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.25rem;
}

.prose ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.6rem;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background: #0088cc;
    border-radius: 50%;
}

.prose ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.prose ul ul li::before {
    width: 6px;
    height: 6px;
    background: transparent;
    border: 2px solid #0088cc;
    top: 0.6em;
}

.prose ul ul ul { padding-left: 1rem; }

.prose ul ul ul li::before {
    width: 5px;
    height: 5px;
    background: rgba(0,136,204,0.4);
    border: none;
}

.prose ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    list-style: decimal;
}

.prose ol li {
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}

.prose ol li::marker {
    color: #0088cc;
    font-weight: 700;
}

.prose li > p {
    margin-bottom: 0.25rem;
}

/* Таблица */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 136, 204, 0.1);
}

.prose th {
    background: #0088cc;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.875rem 1rem;
    text-align: left;
    border: none;
}

.prose td {
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #e0f0fa;
    color: #1a1a2e;
}

.prose tr:nth-child(even) td {
    background: #f0f8ff;
}

.prose tr:hover td {
    background: #e0f0fa;
    transition: background 0.15s ease;
}

/* Цитата */
.prose blockquote {
    border-left: 4px solid #0088cc;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f0f8ff;
    border-radius: 0 12px 12px 0;
    color: #444;
    font-style: italic;
}

/* Код */
.prose code {
    background: #e8f4fd;
    color: #0066aa;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.prose pre {
    background: #0a1628;
    color: #e0f0fa;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9em;
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.prose img {
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.15);
}
