/* public/index.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Noto+Serif+SC:wght@400;700&display=swap');

body {
    background-color: #dcedc8; /* eye-protection warm green */
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif SC', 'SimSun', serif; /* Font matching traditional news site feeling */
    color: #333;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

#app-container {
    width: 90%;
    max-width: 1400px; /* Optimized for 27 inch screens */
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #2b5b32;
    margin-bottom: 5px;
}

.model-badge {
    background: #a5d6a7;
    color: #1b5e20;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.main-layout {
    display: flex;
    width: 100%;
    gap: 20px;
}

.status-panel {
    width: 250px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: fit-content;
    max-height: 500px;
    overflow-y: auto;
}

.status-panel h3 {
    margin-top: 0;
    font-size: 16px;
    color: #388e3c;
    border-bottom: 1px solid #c8e6c9;
    padding-bottom: 8px;
}

#status-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
}

#status-list li {
    padding: 4px 0;
    border-bottom: 1px dashed #e0e0e0;
}
#status-list li.fail { color: #d32f2f; }
#status-list li.success { color: #1976d2; }

.spinner {
    margin-top: 10px;
    width: 30px;
    height: 30px;
    border: 4px solid #c8e6c9;
    border-top: 4px solid #388e3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    align-self: center;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Wood frame structure */
.wood-frame-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wood-border {
    background-color: #fce4ec;
    border: 30px solid transparent;
    /* simulated wood border */
    border-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAEAAAAAAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABAAEADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAaEAACAgMBAAAAAAAAAAAAAAAAAQIDEgQR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIE/8QAGBEBAQEBAQAAAAAAAAAAAAAAAAECAxH/2gAMAwEAAhEDEQA/ALKAAAAAAAABgZAAAAAAAAAAP//Z') 30 stretch;
    background: #8e5b29; /* Fallback for older browsers */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 10px 25px rgba(0,0,0,0.2);
    border-radius: 4px;
    width: 100%;
}

.chat-box {
    background-color: #fff;
    width: 100%;
    min-height: 500px;
    padding: 30px;
    box-sizing: border-box;
}

.chat-box p {
    line-height: 1.8;
}

.user-msg {
    text-align: right;
    margin-bottom: 20px;
}

.user-msg p {
    display: inline-block;
    background: transparent;
    color: #1565c0; /* Blue text */
    font-size: 14px; /* Small text */
    text-align: left;
    margin: 0;
    max-width: 80%;
}

.ai-msg {
    text-align: left;
    margin-bottom: 30px;
    color: #000;      /* Pure black */
    font-size: 18px;  /* Similar to the given site preference http://city.ce.cn... */
}
.ai-msg blockquote {
    border-left: 4px solid #ccc;
    padding-left: 14px;
    margin-left: 0;
    color: #555;
    background: #f9f9f9;
}
.ai-msg code {
    background: #f1f1f1;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
}
.ai-msg pre code {
    display: block;
    padding: 10px;
    overflow-x: auto;
}

.input-container {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#search-keyword {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #a5d6a7;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.chat-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
}

#chat-input {
    flex: 1;
    padding: 15px;
    padding-right: 120px;
    border: 2px solid #8e5b29;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
    font-family: inherit;
}

.send-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 10px 20px;
    background: #388e3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.send-btn:hover { background: #2e7d32; }
.send-btn:disabled { background: #9e9e9e; cursor: not-allowed; }

.admin-link-wrapper {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 50px;
}
.admin-link {
    color: #2b5b32;
    text-decoration: none;
    font-size: 14px;
}
.admin-link:hover { text-decoration: underline; }

/* Responsive tweaks */
@media (max-width: 900px) {
    .main-layout { flex-direction: column; }
    .status-panel { width: 100%; max-height: 150px; }
}
