:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222222;
    --text-primary: #e5e5e5;
    --text-secondary: #d0d0d0;
    --text-muted: #a8a8a8;
    --border-color: #2a2a2a;
    --border-color-light: #333333;
    --accent-primary: #6b73ff;
    --accent-primary-dark: #5a63e6;
    --accent-success: #00d084;
    --accent-success-dark: #00b372;
    --accent-danger: #ff6b6b;
    --accent-danger-dark: #e55555;
    --accent-warning: #ffa726;
    --shadow-color: rgba(0, 0, 0, 0.8);
    --shadow-light: rgba(0, 0, 0, 0.4);
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

.container-fluid {
    padding: 0;
    min-height: 100vh;
}

.row {
    margin: 0;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #0f0f0f 100%);
    border-right: 1px solid var(--border-color);
    padding: 0;
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.sidebar-header h4 {
    margin: 0;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 18px;
}

.sidebar .nav {
    padding: 20px 0;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 20px;
    margin: 3px 15px;
    border-radius: var(--border-radius-sm);
    border: none;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background: rgba(107, 115, 255, 0.08);
    color: var(--accent-primary);
}

.sidebar .nav-link.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link i {
    margin-right: 12px;
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Main Content */
.main-content {
    margin-left: 16.66666667%;
    padding: 30px 40px;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Global Status Bar */
.global-status {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #0f0f0f 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-warning);
    box-shadow: 0 0 0 3px rgba(250, 173, 20, 0.15);
}

.global-status .connection-status { flex: 1; }

.status-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 220px;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
}

.user-info {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-id {
    color: var(--text-muted);
    font-size: 12px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--accent-danger);
    color: white;
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.server-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}



@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
}

/* Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.section-header h2 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--accent-primary);
}

.section-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 16px;
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1e1e1e 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}



.card-header {
    background: linear-gradient(135deg, rgba(107, 115, 255, 0.08) 0%, rgba(107, 115, 255, 0.04) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    backdrop-filter: blur(10px);
}

.card-header h5 {
    margin: 0;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 24px;
    color: var(--text-secondary);
}

/* Form Elements */
.form-control {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: 14px;
}

.form-control:focus {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.15), 0 4px 12px rgba(107, 115, 255, 0.1);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-select {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
}

.form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.15), 0 4px 12px rgba(107, 115, 255, 0.1);
    color: var(--text-primary);
    outline: none;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-text {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 10px 20px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: none;
}

.btn-primary:hover {
    background: var(--accent-primary-dark);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.btn-success {
    background: var(--accent-success);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-success:hover {
    background: var(--accent-success-dark);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.btn-danger {
    background: var(--accent-danger);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-danger:hover {
    background: var(--accent-danger-dark);
    color: white;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Toggle Switches */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    cursor: pointer;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: #2b3344;
    border: 2px solid var(--border-color);
    border-radius: 999px;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px var(--shadow-light);
}

.toggle-input:checked + .toggle-switch .toggle-track {
    background: var(--accent-success);
    border-color: var(--accent-success);
}

.toggle-input:checked + .toggle-switch .toggle-thumb {
    transform: translateX(28px);
}

.toggle-input:focus + .toggle-switch .toggle-track {
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.15);
    border-color: var(--accent-primary);
}

.toggle-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.toggle-label { flex: 1; }

/* toggle-status entfernt */

/* Modals */
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 24px var(--shadow-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}



/* Categories */
.add-category-section {
    text-align: center;
    margin-bottom: 30px;
}

.add-category-btn {
    background: var(--accent-success);
    color: white;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(82, 196, 26, 0.3);
}



.add-category-btn i {
    font-size: 18px;
}

.category-card {
    position: relative;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}



.category-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.category-actions .btn {
    margin-left: 8px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--border-radius-sm);
}

/* Form Fields */
.form-field {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}



.form-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.form-field-header h6 {
    margin: 0;
    color: var(--accent-primary);
    font-weight: 600;
}

/* Server Info */
#server-info {
    padding: 8px 16px;
    margin-bottom: 12px;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

#server-info .row {
    align-items: center;
}

#server-info .col-auto {
    padding-right: 8px;
}

#server-info .col {
    padding-left: 8px;
}

#server-info .server-info-icon {
    font-size: 16px;
    color: var(--accent-primary);
}

#server-info strong {
    font-size: 13px;
    font-weight: 700;
    margin-right: 8px;
    color: var(--text-secondary);
}

#server-info #current-server-name {
    font-size: 13px;
    color: var(--text-primary);
}

#server-info br { 
    display: none; 
}

/* Connection Status */
.connection-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
}

.connection-status.connected {
    color: var(--accent-success);
    background: rgba(0, 208, 132, 0.1);
    box-shadow: 0 0 0 1px rgba(0, 208, 132, 0.2);
}

.connection-status.error {
    color: var(--accent-danger);
    background: rgba(255, 107, 107, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.2);
}

.connection-status.connecting {
    color: var(--accent-warning);
    background: rgba(255, 167, 38, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 167, 38, 0.2);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    z-index: 10;
}

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

/* Alerts */
.alert-info {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
}

.alert-success {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.alert-danger {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Empty State */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    opacity: 0.9;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.85;
}

.empty-state h3 {
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-weight: 700;
}

.empty-state p {
    margin: 0 0 16px 0;
}

.empty-hint {
    text-align: center;
    padding: 28px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
}

/* Notifications */
.alert-dismissible {
    background: var(--bg-card);
    border: 2px solid var(--accent-success);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px var(--shadow-color);
}

/* Emoji Preview */
.emoji-preview {
    font-size: 28px;
    margin-right: 12px;
}

/* Typography */
h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 16px;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}



@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Tickets Section */
.ticket-card {
    cursor: pointer;
    border: 2px solid var(--border-color);
}

.ticket-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(107, 115, 255, 0.2);
}

.ticket-avatar {
    position: relative;
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.avatar-placeholder-sm {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

/* Chat Interface */
.chat-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.chat-header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.chat-header-right .btn {
    border-radius: 8px;
    font-weight: 500;
}


.chat-title {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ticket-name {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ticket-user {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    padding: 0;
}


.ticket-status {
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    background: rgba(var(--accent-primary-rgb), 0.15);
    border-radius: 12px;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
    margin-top: 2px;
}


.ticket-status-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
}

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}


.message-avatar {
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.message-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.message-timestamp {
    font-size: 12px;
    color: var(--text-muted);
}

.message-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.bot-message .message-author {
    color: var(--accent-primary);
}

.bot-message .message-author::after {
    content: " BOT";
    background: var(--accent-primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 4px;
}

.no-messages {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.no-messages i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-messages p {
    margin: 0;
    font-size: 16px;
}

/* Chat Input */
.chat-input-container {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
}

.chat-input-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}




.chat-input-area:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(107, 115, 255, 0.15);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    min-height: 20px;
    max-height: 120px;
    padding: 4px 0;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}



.chat-send-btn i {
    font-size: 14px;
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}


/* Discord Embeds */
.discord-embed {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-primary);
    margin: 8px 0;
    max-width: 520px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: row;
}

.embed-content {
    padding: 16px;
    flex: 1;
    min-width: 0;
}

.embed-author {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.embed-author-icon {
    border-radius: 50%;
    margin-right: 8px;
}

.embed-author-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}


.embed-title {
    color: var(--accent-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
}

.embed-title a {
    color: var(--accent-primary);
    text-decoration: none;
}


.embed-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.embed-fields {
    margin-top: 8px;
}

.embed-field {
    margin-bottom: 8px;
}

.embed-field.inline {
    display: inline-block;
    width: calc(50% - 8px);
    margin-right: 16px;
    vertical-align: top;
}

.embed-field-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.embed-field-value {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.embed-thumbnail {
    flex-shrink: 0;
    padding: 16px 16px 16px 0;
}

.embed-thumbnail-img {
    max-width: 80px;
    max-height: 80px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
}

.embed-image {
    margin-top: 16px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.embed-image-img {
    max-width: 100%;
    height: auto;
    display: block;
}

.embed-footer {
    display: flex;
    align-items: center;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.embed-footer-icon {
    border-radius: 50%;
    margin-right: 8px;
}

.embed-footer-text {
    margin-right: 4px;
}

.embed-timestamp {
    color: var(--text-muted);
}

/* Badges */
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.bg-primary {
    background-color: var(--accent-primary) !important;
}

/* Message Styling Improvements */
.message-text {
    max-width: 100%;
    overflow-wrap: break-word;
}

.message-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.message-text em {
    color: var(--text-primary);
    font-style: italic;
}

.message-text u {
    text-decoration: underline;
    color: var(--text-primary);
}

.message-text del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-text .inline-code {
    background: var(--bg-secondary);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
}

.message-text .code-block {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    margin: 8px 0;
    overflow-x: auto;
    white-space: pre;
}

.message-text .mention {
    background: rgba(107, 115, 255, 0.15);
    color: var(--accent-primary);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.message-text .channel-mention {
    background: rgba(0, 208, 132, 0.15);
    color: var(--accent-success);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.message-text .emoji {
    font-weight: 600;
    color: var(--accent-warning);
}

.message-text a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}



/* Bootstrap Override */
.text-muted {
    color: var(--text-muted) !important;
}

/* Ticket Card Text Improvements */
.ticket-card .text-muted {
    color: #c0c0c0 !important;
}

.ticket-card h6 {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.ticket-card small {
    color: #b8b8b8 !important;
}

/* Login Page Styles */
.login-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 100;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, #1e1e1e 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 40px 30px 20px;
    background: linear-gradient(135deg, rgba(107, 115, 255, 0.1) 0%, rgba(107, 115, 255, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 32px rgba(107, 115, 255, 0.3);
}

.login-logo.error-logo {
    background: var(--accent-danger);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
}

.login-logo i {
    font-size: 32px;
    color: white;
}

.login-header h1 {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 28px;
}

.login-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.login-content {
    padding: 30px;
}

.welcome-text {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 22px;
}

.welcome-text p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-requirements {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 30px;
}

.login-requirements h6 {
    margin: 0 0 12px;
    color: var(--accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-requirements ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.login-requirements li {
    margin-bottom: 6px;
    font-size: 14px;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: #5865f2;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 16px;
    border: none;
    position: relative;
    overflow: hidden;
}

.discord-login-btn:hover {
    background: #4752c4;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

.discord-login-btn.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.discord-login-btn.btn-secondary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.discord-login-btn i {
    font-size: 20px;
}

.btn-arrow {
    margin-left: auto;
}

.discord-login-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.2;
    pointer-events: none;
}

.background-pattern {
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 25% 25%, var(--accent-primary) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, var(--accent-success) 0%, transparent 50%);
    filter: blur(60px);
}

/* Error Page Styles */
.error-message {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: var(--border-radius-sm);
}

.error-message h3 {
    margin: 0 0 12px;
    color: var(--accent-danger);
    font-weight: 600;
}

.error-text {
    margin: 0;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.error-help {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 30px;
}

.error-help h6 {
    margin: 0 0 12px;
    color: var(--accent-warning);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-help ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.error-help li {
    margin-bottom: 6px;
    font-size: 14px;
}

.error-help code {
    background: var(--bg-secondary);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--accent-primary);
}

/* Responsive Login */
@media (max-width: 576px) {
    .login-container {
        max-width: 100%;
        padding: 10px;
    }
    
    .login-content {
        padding: 20px;
    }
    
    .login-header {
        padding: 30px 20px 15px;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
    
    .login-logo i {
        font-size: 24px;
    }
}

/* Message Attachments */
.message-attachments {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.attachment {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}

.attachment-image {
    max-width: 300px;
    max-height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: block;
}

.attachment-image:hover {
    transform: scale(1.02);
}

.attachment-file {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.attachment-file:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
    text-decoration: none;
}

.attachment-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.attachment-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attachment-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.attachment-size {
    font-size: 0.75rem;
    color: var(--text-secondary);
}