/* ============================================
   ОБНУЛЕНИЕ И БАЗА
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ============================================
   ШАПКА
============================================ */
.header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a2e;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}

.logo-highlight {
    color: #fbbf24;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #9ca3af;
    font-size: 14px;
    transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

/* ============================================
   ГЛАВНЫЙ БАННЕР
============================================ */
.hero {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(180deg, #0a0a0f 0%, #1a1a2e 100%);
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: #9ca3af;
}

@media (max-width: 600px) {
    .hero h1 {
        font-size: 24px;
    }
    .hero p {
        font-size: 16px;
    }
}

/* ============================================
   СТРИМЕРЫ
============================================ */
.streamers {
    padding: 60px 0;
}

.streamers h2 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
}

.streamers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.streamer-card {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
}

.streamer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.streamer-card-img {
    width: 100%;
    aspect-ratio: 1/1;
    background: #2a2a3e;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.streamer-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.streamer-card:hover .streamer-card-img img {
    transform: scale(1.05);
}

.streamer-card-info {
    padding: 12px;
}

.streamer-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.streamer-card-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-online {
    color: #22c55e;
}

.status-offline {
    color: #6b7280;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background: #22c55e;
}

.status-dot.offline {
    background: #6b7280;
}

/* ============================================
   ЧАТ
============================================ */
.chat-widget {
    padding: 40px 0;
    background: #0f0f1a;
}

.chat-container {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
}

.chat-header-widget {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1f1f33;
    border-bottom: 1px solid #2a2a3e;
    font-weight: 600;
}

.chat-online {
    color: #fbbf24;
    font-weight: 700;
}

.chat-messages-widget {
    height: 250px;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-messages-widget::-webkit-scrollbar {
    width: 4px;
}

.chat-messages-widget::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.chat-msg {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-msg-bot {
    color: #e5e7eb;
}

.chat-msg-user {
    background: rgba(59, 130, 246, 0.1);
    align-self: flex-end;
}

.chat-msg-other {
    align-self: flex-start;
}

.chat-msg .chat-name {
    font-weight: 600;
    color: #fbbf24;
}

.chat-msg-user .chat-name {
    color: #93c5fd;
}

.chat-input-widget {
    padding: 8px 12px;
    border-top: 1px solid #2a2a3e;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-input-widget input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #2a2a3e;
    background: #0f0f1a;
    color: #fff;
    font-size: 14px;
    outline: none;
    min-width: 120px;
}

.chat-input-widget input:focus {
    border-color: #3b82f6;
}

.chat-input-widget input#chatNameInput {
    flex: 0 0 140px;
    color: #fbbf24;
    font-weight: 600;
}

.chat-input-widget input#chatNameInput:focus {
    border-color: #fbbf24;
}

.chat-input-widget button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: #3b82f6;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .chat-input-widget input#chatNameInput {
        flex: 1 1 100%;
    }
    .chat-input-widget input[type="text"] {
        flex: 1 1 100%;
    }
    .chat-input-widget button {
        width: 100%;
    }
}

/* ============================================
   ОШИБКА ВВОДА
============================================ */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.chat-msg-error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    align-self: center;
    max-width: 90%;
    text-align: center;
    animation: fadeIn 0.3s ease;
    margin: 4px 0;
    transition: opacity 0.5s ease;
}

/* ============================================
   ПОДВАЛ
============================================ */
.footer {
    padding: 24px 0;
    border-top: 1px solid #1a1a2e;
    margin-top: 40px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    color: #9ca3af;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

/* ============================================
   АДАПТИВ
============================================ */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav {
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .streamers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .streamers-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .streamer-card-name {
        font-size: 12px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}