* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1e1e1e;
    color: #cccccc;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #252526;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #007acc;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #3e3e42;
}

.token-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-section label {
    font-size: 12px;
    color: #cccccc;
}

.token-section input {
    padding: 8px;
    background: #3e3e42;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}

.token-section input:focus {
    outline: none;
    border-color: #007acc;
}

.btn-primary, .btn-secondary {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #007acc;
    color: white;
}

.btn-primary:hover {
    background-color: #005a9e;
}

.btn-secondary {
    background-color: #3e3e42;
    color: #cccccc;
}

.btn-secondary:hover {
    background-color: #505050;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 11px;
    color: #cccccc;
    font-weight: bold;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.radio-label:hover, .checkbox-label:hover {
    background-color: #2d2d30;
}

input[type="radio"], input[type="checkbox"] {
    cursor: pointer;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    height: 50px;
    background-color: #2d2d30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #3e3e42;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #555;
    transition: background-color 0.3s;
}

.status.connected .status-dot {
    background-color: #40bf40;
}

.hover-status {
    font-size: 11px;
    color: #cccccc;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.welcome-message {
    text-align: center;
    margin-top: 100px;
}

.welcome-message h2 {
    color: #007acc;
    margin-bottom: 10px;
}

.welcome-message p {
    color: #888;
}

/* Message Card */
.message-card {
    background-color: #3e3e42;
    border-left: 3px solid #007acc;
    border-radius: 4px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-card:hover {
    background-color: #505050;
    transform: translateY(-2px);
}

.message-card.favorite {
    border: 3px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
    background-color: #3e3e42;
}

.message-card.favorite:hover {
    background-color: #505050;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
}

.message-card.copied {
    animation: flashBlue 0.5s;
}

@keyframes flashBlue {
    0%, 100% { background-color: #3e3e42; }
    50% { background-color: #007acc; }
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 15px;
}

.message-author {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.message-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.badge-role {
    background-color: #3e3e42;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1;
}

.badge-stat {
    background-color: #2d2d30;
    color: #ffd700;
    padding: 2px 6px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.badge-region {
    background-color: #2d2d30;
}

.badge-channel {
    color: #000;
}

.message-timestamp {
    font-size: 11px;
    color: #888;
}

.message-content {
    color: #cccccc;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.fellowship-id {
    color: #4ec9b0;
    font-weight: bold;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background-color: #252526;
    border: 1px solid #3e3e42;
    border-radius: 4px;
    padding: 4px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background-color: #2d2d30;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #252526;
    border-radius: 8px;
    width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #3e3e42;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #fff;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #3e3e42;
    display: flex;
    justify-content: flex-end;
}

.settings-section {
    margin-bottom: 25px;
}

.settings-section h3 {
    color: #007acc;
    font-size: 14px;
    margin-bottom: 10px;
}

.channel-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background-color: #2d2d30;
    border-radius: 4px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background-color: #3e3e42;
    border-radius: 3px;
}

.player-item button {
    background-color: #e81123;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.player-item button:hover {
    background-color: #c00;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #3e3e42;
    border-radius: 4px;
}

.user-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-item-username {
    font-weight: bold;
    color: #fff;
    display: block;
    margin-bottom: 4px;
}

.user-item-last-login {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 2px;
}

.user-item-role {
    font-size: 11px;
    color: #007acc;
}

.user-item-actions {
    display: flex;
    gap: 8px;
}

.user-item-actions button {
    background-color: #555;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.user-item-actions button:hover {
    background-color: #666;
}

.user-item-actions button.danger {
    background-color: #e81123;
}

.user-item-actions button.danger:hover {
    background-color: #c00;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #cccccc;
}

.form-group input {
    width: 100%;
    padding: 8px;
    background: #3e3e42;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
}

.form-group input:focus {
    outline: none;
    border-color: #007acc;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #3e3e42;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #505050;
}
