/* AI Agent Static Site Styles */

* {
    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;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glass panel effect for consistent styling */
.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Header */
.header {
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.version {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 10px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f7fafc;
    border-radius: 20px;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    animation: pulse 2s infinite;
}

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

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    flex: 1;
}

/* Chat container */
.chat-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
}

/* Messages */
.message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.message-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    border-radius: 15px;
    max-width: 80%;
}

.user-message .message-content {
    background: #667eea;
    color: white;
    margin-left: auto;
    flex-direction: row-reverse;
}

.agent-message .message-content {
    background: #f7fafc;
    color: #4a5568;
}

.message-time {
    font-size: 0.8rem;
    color: #a0aec0;
    margin-top: 5px;
    text-align: right;
}

.user-message .message-time {
    text-align: left;
}

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

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

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

#messageInput:focus {
    border-color: #667eea;
}

.send-button {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.send-button:hover {
    background: #5a67d8;
}

.input-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
    transition: all 0.3s;
}

.action-button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    padding: 20px;
}

.sidebar-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-action {
    padding: 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.quick-action:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Stats */
.stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #4a5568;
}

.stat-value {
    color: #667eea;
    font-weight: 600;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notice banner */
.notice {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #234e52;
}

/* News card styles */
.news-container {
    margin-top: 10px;
}

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-article {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-article:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    transform: translateY(-2px);
}

.news-article-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-article-description {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

.news-article-source {
    font-weight: 500;
    color: #667eea;
}

.news-article-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-article-link:hover {
    text-decoration: underline;
}

.news-article-link::after {
    content: '→';
    transition: transform 0.2s;
}

.news-article:hover .news-article-link::after {
    transform: translateX(4px);
}

.agent-message.news-type .message-content {
    max-width: 100%;
    padding: 20px;
}

/* Weather card styles */
.weather-container {
    margin-top: 10px;
}

.weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.weather-content {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.weather-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.weather-icon {
    font-size: 3.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.weather-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.weather-location {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
    margin-bottom: 4px;
}

.weather-temp {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.weather-condition {
    font-size: 0.95rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.weather-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.weather-detail-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    min-width: 70px;
}

.weather-detail-label {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 2px;
}

.weather-detail-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.weather-joke {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.agent-message.weather-type .message-content {
    max-width: 100%;
    padding: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 10px;
    }

    .weather-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .weather-left {
        width: 100%;
    }
    
    .weather-details {
        width: 100%;
        justify-content: space-between;
    }
    
    .weather-temp {
        font-size: 2.5rem;
    }
    
    .weather-icon {
        font-size: 3rem;
    }
}
