188 lines
3.1 KiB
CSS

/* General Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
margin: 0;
background-color: #f4f7f9;
color: #333;
line-height: 1.6;
}
.app-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background-color: #2c3e50;
color: #ecf0f1;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
margin: 0;
font-size: 1.8em;
}
.connection-status span {
font-size: 0.9em;
}
main {
display: grid;
grid-template-columns: 1fr;
gap: 20px;
}
section {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
h2 {
margin-top: 0;
color: #3498db;
border-bottom: 2px solid #ecf0f1;
padding-bottom: 10px;
margin-bottom: 15px;
}
/* Message Statistics */
.stats-counters {
display: flex;
justify-content: space-around;
text-align: center;
}
.counter-value {
display: block;
font-size: 2em;
font-weight: bold;
color: #2980b9;
}
.counter-label {
font-size: 0.9em;
color: #555;
}
/* Message Controls */
.btn {
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
transition: background-color 0.3s ease;
}
.btn-primary {
background-color: #3498db;
color: white;
}
.btn-primary:hover {
background-color: #2980b9;
}
.search-container {
margin-top: 15px;
display: flex;
gap: 10px;
}
#searchInput {
flex-grow: 1;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 0.9em;
}
/* Message Display */
.message-list {
max-height: 400px;
overflow-y: auto;
border: 1px solid #ecf0f1;
border-radius: 5px;
padding: 10px;
}
.message-item {
padding: 10px;
margin-bottom: 8px;
border-radius: 4px;
background-color: #ecf0f1;
font-size: 0.9em;
}
.message-item.sent {
background-color: #eafaf1; /* Light green for sent */
}
.message-item.received-mine {
background-color: #e8f6fd; /* Light blue for received (mine) */
}
.message-item.received-other {
background-color: #fdf3e8; /* Light orange for received (other) */
}
.message-item p {
margin: 5px 0;
}
.message-item .timestamp {
font-size: 0.8em;
color: #7f8c8d;
text-align: right;
}
.message-item .content {
font-weight: 500;
}
.message-item .sender-info {
font-size: 0.8em;
color: #34495e;
}
/* Added style for Message ID */
.message-item .message-id {
font-size: 0.75em;
color: #888;
margin-bottom: 3px;
word-break: break-all; /* Ensure long IDs don't break layout */
}
footer {
text-align: center;
margin-top: 30px;
padding-top: 15px;
border-top: 1px solid #ecf0f1;
font-size: 0.9em;
color: #7f8c8d;
}
/* Responsive Design */
@media (min-width: 768px) {
main {
grid-template-columns: repeat(2, 1fr);
}
.message-stats, .message-controls {
grid-column: span 1;
}
.message-display {
grid-column: span 2;
}
}