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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    height: calc(100vh - 200px);
}

.status-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.status-panel h3 {
    margin-bottom: 20px;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.streetlight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #4299e1;
    transition: all 0.3s ease;
}

.streetlight-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.streetlight-item.on {
    border-left-color: #48bb78;
    background: #f0fff4;
}

.streetlight-item.off {
    border-left-color: #f56565;
    background: #fffaf0;
}

.streetlight-item.unknown {
    border-left-color: #a0aec0;
    background: #f7fafc;
}

.streetlight-status {
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-on {
    background: #c6f6d5;
    color: #22543d;
}

.status-off {
    background: #fed7d7;
    color: #742a2a;
}

.status-unknown {
    background: #e2e8f0;
    color: #4a5568;
}

.chat-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 20px;
    text-align: center;
}

.chat-header h3 {
    margin-bottom: 5px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

.message {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

.message-content {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 20px;
    line-height: 1.5;
}

.bot-message .message-content {
    background: #e2e8f0;
    color: #2d3748;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.user-message .message-content {
    background: #4299e1;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.message-content li {
    margin: 5px 0;
}

.chat-input-container {
    display: flex;
    padding: 20px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

#chat-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

#send-button {
    margin-left: 15px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

#send-button:active {
    transform: translateY(0);
}

.loading {
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .message-content {
        max-width: 95%;
    }
}
