* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.chat-container {
    max-width: 600px;
    height: 100vh;
    margin: 0 auto;
    background: #f0f2f5;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.chat-header {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.status {
    font-size: 0.8rem;
    opacity: 0.9;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: #4F46E5;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message.other {
    background: white;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.system {
    background: #e0e0e0;
    color: #666;
    align-self: center;
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 20px;
}

.input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#messageInput:focus {
    border-color: #4F46E5;
}

#sendBtn {
    padding: 12px 20px;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

#sendBtn:hover {
    background: #4338CA;
    transform: scale(1.02);
}

.push-controls {
    padding: 10px 15px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.push-btn {
    background: #10B981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.push-btn:hover {
    background: #059669;
    transform: scale(1.02);
}

.push-btn.subscribed {
    background: #6B7280;
}

/* Адаптация для PWA в полноэкранном режиме */
@media (display-mode: standalone) {
    body {
        background: #f0f2f5;
    }
    
    .chat-header {
        padding-top: 30px;
    }
}