@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ----- CSS Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- Video Background System ----- */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3) contrast(1.15) saturate(1.1);
    opacity: 0;
    transition: opacity 2s ease;
}

.video-background.loaded video {
    opacity: 1;
}

.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9;
    background: 
        radial-gradient(circle at 20% 30%, rgba(88, 101, 242, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(114, 137, 218, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.video-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: 1;
    opacity: 1;
    transition: opacity 2s ease;
}

.video-background.loaded::before {
    opacity: 0;
}

/* ----- Particles ----- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -8;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(1) { width: 3px; height: 3px; left: 10%; top: 80%; animation-delay: 0s; }
.particle:nth-child(2) { width: 2px; height: 2px; left: 20%; top: 70%; animation-delay: 3s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; top: 85%; animation-delay: 6s; }
.particle:nth-child(4) { width: 2px; height: 2px; left: 40%; top: 75%; animation-delay: 9s; }
.particle:nth-child(5) { width: 3px; height: 3px; left: 50%; top: 90%; animation-delay: 12s; }
.particle:nth-child(6) { width: 2px; height: 2px; left: 60%; top: 80%; animation-delay: 2s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; top: 85%; animation-delay: 5s; }
.particle:nth-child(8) { width: 2px; height: 2px; left: 80%; top: 75%; animation-delay: 8s; }

@keyframes particleFloat {
    0% { 
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(0); 
        opacity: 0; 
    }
    5% { 
        opacity: 1;
        transform: scale(1);
    }
    95% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(-110vh) translateX(20px) rotate(360deg) scale(0); 
        opacity: 0; 
    }
}

/* ----- Back Button ----- */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 100;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-6px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.back-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.back-button:hover .back-icon {
    transform: translateX(-4px);
}

/* ----- Main Layout ----- */
.main-wrapper {
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ----- SSO Login Container ----- */
.sso-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    animation: fadeInScale 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.sso-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}


.sso-form .sso-button {
  margin-top: 20px; /* increase/decrease as needed (8px, 16px, etc.) */
}

.sso-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 40px 80px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ----- SSO Header ----- */
.sso-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), rgba(114, 137, 218, 0.15));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865f2;
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

.lock-icon svg {
    width: 40px;
    height: 40px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(88, 101, 242, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(88, 101, 242, 0.5);
    }
}

.sso-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.sso-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* ----- SSO Form ----- */
.sso-form {
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
    z-index: 10;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.6rem;
    letter-spacing: 0.3px;
}

.sso-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    pointer-events: auto;
    cursor: text;
    position: relative;
    z-index: 10;
}

.sso-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5865f2;
    box-shadow: 
        0 0 0 4px rgba(88, 101, 242, 0.15),
        0 8px 24px rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

.sso-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #5865f2, #7289da);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.sso-input:focus ~ .input-underline {
    width: 100%;
}

.sso-button {
    width: 100%;
    padding: 1.1rem 2rem;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.4);
    position: relative;
    overflow: hidden;
}

.sso-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s ease;
}

.sso-button:hover::before {
    left: 100%;
}

.sso-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(88, 101, 242, 0.6);
}

.sso-button:active {
    transform: translateY(-2px);
}

.button-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.sso-button:hover .button-icon {
    transform: translateX(4px);
}

/* ----- SSO Footer ----- */
.sso-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 14px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
     margin-bottom: 0.75rem;
}

.sso-footer svg {
    width: 20px;
    height: 20px;
    color: #ffd700;
    flex-shrink: 0;
}

/* ----- Staff Panel ----- */
.staff-panel {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.8s ease;
}

/* ----- Panel Header ----- */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideInDown 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(114, 137, 218, 0.2));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5865f2;
}

.header-icon svg {
    width: 32px;
    height: 32px;
}

.panel-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.panel-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.logout-button:hover {
    background: rgba(244, 67, 54, 0.15);
    border-color: rgba(244, 67, 54, 0.3);
    transform: translateY(-2px);
}

.logout-button svg {
    width: 20px;
    height: 20px;
}

/* ----- Panel Sections ----- */
.panel-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.section-header {
    margin-bottom: 1.5rem;
}

.panel-section:has(.bot-control-card) .section-header {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-title h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.section-title svg {
    width: 32px;
    height: 32px;
    color: #5865f2;
}

/* Bot Control Section Title Enhancement */
.panel-section:has(.bot-control-card) .section-title h2 {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.panel-section:has(.bot-control-card) .section-title svg {
    color: #5865f2;
}


/* ----- Advanced Options ----- */
.toggle-advanced-button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: inherit;
}

.toggle-advanced-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.toggle-advanced-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.toggle-advanced-button.active svg {
    transform: rotate(180deg);
}

.advanced-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.4s ease;
}

/* ----- Field & Button Items ----- */
.field-item,
.button-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    animation: fadeInScale 0.3s ease;
}

.field-header,
.button-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.field-title,
.button-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.remove-field-button,
.remove-button-button {
    width: 32px;
    height: 32px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 10px;
    color: #f44336;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.remove-field-button:hover,
.remove-button-button:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.4);
    transform: scale(1.1);
}

.remove-field-button svg,
.remove-button-button svg {
    width: 18px;
    height: 18px;
}

.field-inputs,
.button-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.add-field-button,
.add-button-button {
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1.5px dashed rgba(88, 101, 242, 0.3);
    border-radius: 14px;
    color: #5865f2;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    margin-top: 0.8rem;
    font-family: inherit;
}

.add-field-button:hover,
.add-button-button:hover {
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.5);
    transform: translateY(-2px);
}

.add-field-button svg,
.add-button-button svg {
    width: 18px;
    height: 18px;
}

/* ----- Checkbox ----- */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5865f2;
}

.checkbox-label span {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* ----- Inline Checkbox (for fields) ----- */
.inline-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.inline-checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #5865f2;
}

/* ----- Additional Animation ----- */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ----- Cards ----- */
.card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ----- Forms ----- */
.announcement-form,
.mod-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    width: 100%;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5865f2;
    box-shadow: 
        0 0 0 4px rgba(88, 101, 242, 0.15),
        0 4px 16px rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-select {
    cursor: pointer;
}

.form-select option {
    background: #1a1a2e;
    color: #ffffff;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ----- Color Picker ----- */
.color-picker-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.color-picker:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.color-hex-input {
    flex: 1;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    transition: all 0.3s ease;
    outline: none;
}

.color-hex-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5865f2;
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}

/* ----- Action Buttons ----- */
.action-button {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.action-button svg {
    width: 20px;
    height: 20px;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.action-button:hover::before {
    left: 100%;
}

.action-button:hover {
    transform: translateY(-3px);
}

.action-button:active {
    transform: translateY(-1px);
}

/* Button Variants */
.action-button.primary {
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.4);
}

.action-button.primary:hover {
    box-shadow: 0 12px 40px rgba(88, 101, 242, 0.6);
}

.action-button.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 8px 32px rgba(244, 67, 54, 0.4);
}

.action-button.danger:hover {
    box-shadow: 0 12px 40px rgba(244, 67, 54, 0.6);
}

.action-button.success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.4);
}

.action-button.success:hover {
    box-shadow: 0 12px 40px rgba(76, 175, 80, 0.6);
}

.action-button.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 8px 32px rgba(255, 152, 0, 0.4);
}

.action-button.warning:hover {
    box-shadow: 0 12px 40px rgba(255, 152, 0, 0.6);
}

.action-button.timeout {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    box-shadow: 0 8px 32px rgba(156, 39, 176, 0.4);
}

.action-button.timeout:hover {
    box-shadow: 0 12px 40px rgba(156, 39, 176, 0.6);
}

.action-button.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    box-shadow: 0 8px 32px rgba(33, 150, 243, 0.4);
}

.action-button.info:hover {
    box-shadow: 0 12px 40px rgba(33, 150, 243, 0.6);
}

/* ----- Moderation Grid ----- */
.moderation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mod-card {
    padding: 2rem;
}

.mod-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mod-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mod-icon svg {
    width: 24px;
    height: 24px;
}

.ban-icon {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.success-icon {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.warning-icon {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
}

.timeout-icon {
    background: rgba(156, 39, 176, 0.15);
    color: #9c27b0;
}

.info-icon {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.mod-card-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

/* ----- Toast Notification ----- */
.toast {
    position: fixed;
    bottom: -200px;
    right: 2rem;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: start;
    gap: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transition: bottom 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1000;
}

.toast.show {
    bottom: 2rem;
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon svg {
    width: 24px;
    height: 24px;
}

.toast.success .toast-icon {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.toast.error .toast-icon {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.toast.info .toast-icon {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.toast-message {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.toast-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.toast-close svg {
    width: 16px;
    height: 16px;
}

/* ----- Footer ----- */
.panel-footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 300;
}
/* ----- DM Textarea ----- */
.dm-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* Info button style */
.action-button.info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.action-button.info:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4);
}

/* Bot Control Section */
.bot-control-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 193, 7, 0.1));
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.bot-control-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.control-info h3 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.2rem;
}

.control-info p {
    margin: 0;
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Toggle Switch */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    z-index: 2;
}

.toggle-input:checked + .toggle-slider {
    background-color: #4caf50;
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    z-index: 1;
}

.toggle-icon svg {
    width: 16px;
    height: 16px;
}

.lock-icon {
    left: 6px;
    opacity: 1;
    transition: opacity 0.4s;
}

.unlock-icon {
    right: 6px;
    opacity: 0;
    transition: opacity 0.4s;
}

.toggle-input:checked ~ .lock-icon {
    opacity: 0;
}

.toggle-input:checked ~ .unlock-icon {
    opacity: 1;
}

.toggle-status {
    font-weight: 600;
    color: #fff;
    min-width: 100px;
}

/* ----- Bad Word Management ----- */
.badword-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.badword-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.badword-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.badword-input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
}

.badword-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5865f2;
    box-shadow: 
        0 0 0 4px rgba(88, 101, 242, 0.15),
        0 8px 24px rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

.badword-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.badword-button {
    width: 100%;
    padding: 1.1rem 2rem;
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.badword-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-button {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.4);
}

.add-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 12px 48px rgba(76, 175, 80, 0.5);
    transform: translateY(-2px);
}

.add-button:active:not(:disabled) {
    transform: translateY(0);
}

.remove-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
}

.remove-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #ee5a52 0%, #e74c3c 100%);
    box-shadow: 0 12px 48px rgba(255, 107, 107, 0.5);
    transform: translateY(-2px);
}

.remove-button:active:not(:disabled) {
    transform: translateY(0);
}

.button-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.badword-button:hover:not(:disabled) .button-icon {
    transform: scale(1.1);
}

/* Status Messages */
.status-message {
    display: none;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.status-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.status-message.error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.status-message.warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Input Group Positioning */
.input-group {
    position: relative;
    margin-bottom: 0;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #5865f2, #7289da);
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.badword-input:focus ~ .input-underline {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .badword-card {
        padding: 1.5rem;
    }
    
    .badword-button {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .badword-input {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
}

/* ----- Animations ----- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ----- Responsive Design ----- */
@media (max-width: 1024px) {
    .moderation-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .main-wrapper {
        padding: 1rem;
    }

    .sso-card {
        padding: 2rem 1.5rem;
    }

    .lock-icon {
        width: 64px;
        height: 64px;
    }

    .lock-icon svg {
        width: 32px;
        height: 32px;
    }

    .sso-title {
        font-size: 2rem;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .header-content {
        width: 100%;
    }

    .logout-button {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 1.5rem;
    }

    .moderation-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }

    .toast.show {
        bottom: 1rem;
    }
}
/* Hide password reveal icon (Chromium, Edge, etc.) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* Hide reveal button (Webkit - Chrome, Opera, Brave) */
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-inner-spin-button,
input[type="password"]::-webkit-contacts-auto-fill-button {
    display: none;
}
@media (max-width: 480px) {
    .back-button span {
        display: none;
    }

    .back-button {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }

    .sso-card {
        padding: 2rem 1.2rem;
    }

    .lock-icon {
        width: 56px;
        height: 56px;
    }

    .sso-subtitle {
        font-size: 0.9rem;
    }

    .header-icon {
        width: 48px;
        height: 48px;
    }

    .header-icon svg {
        width: 24px;
        height: 24px;
    }

    .panel-title {
        font-size: 1.3rem;
    }

    .panel-subtitle {
        font-size: 0.85rem;
    }

    .section-title h2 {
        font-size: 1.2rem;
    }

    .section-title svg {
        width: 24px;
        height: 24px;
    }

    .card {
        padding: 1.2rem;
    }

    .mod-card {
        padding: 1.5rem;
    }

    .mod-icon {
        width: 40px;
        height: 40px;
    }

    .mod-icon svg {
        width: 20px;
        height: 20px;
    }

    .mod-card-header h3 {
        font-size: 1.1rem;
    }

    .color-picker {
        width: 50px;
        height: 50px;
    }
}

/* ----- Performance Optimizations ----- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .video-background video {
        animation: none;
    }

    .particles {
        display: none;
    }
}

/* ----- High Contrast Mode ----- */
@media (prefers-contrast: high) {
    .sso-card,
    .card,
    .panel-header {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .form-input,
    .form-select,
    .form-textarea {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.25);
    }
}

/* ----- Hardware Acceleration ----- */
.video-background,
.video-background video,
.sso-card,
.card,
.panel-header,
.action-button,
.toast {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}
/* ====================== Channel Chat Window ====================== */
.chat-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.chat-channel-selector {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.chat-messages-container {
    height: 450px;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    scroll-behavior: smooth;
}

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

.chat-messages-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Placeholder */
.chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.4);
    gap: 1rem;
}

.chat-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.chat-placeholder p {
    font-size: 1rem;
    font-weight: 500;
}

/* Message Item */
.chat-message {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    animation: messageSlideIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.03);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.chat-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.chat-message-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.chat-message-author {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.chat-message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.chat-message-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Truncate long messages */
.chat-message-text.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Send Message Form */
.chat-send-form {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.chat-input {
    flex: 1;
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    outline: none;
}

.chat-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #5865f2;
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.15);
}

.chat-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-send-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
    flex-shrink: 0;
}

.chat-send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.4);
}

.chat-send-button:active:not(:disabled) {
    transform: translateY(0);
}

.chat-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-button svg {
    width: 20px;
    height: 20px;
}

/* Loading State */
.chat-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.chat-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .chat-messages-container {
        height: 350px;
    }
    
    .chat-message-avatar {
        width: 32px;
        height: 32px;
    }
}
/* ====================== Enhanced Chat Features ====================== */

/* Typing Indicator */
.chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-style: italic;
}

.chat-typing-dots {
    display: flex;
    gap: 4px;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.chat-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Message sent by bot indicator */
.chat-message.bot-message .chat-message-author {
    color: #5865f2;
}

.chat-message.bot-message .chat-message-avatar {
    border: 2px solid #5865f2;
}

/* System message styling */
.chat-message.system-message {
    background: rgba(88, 101, 242, 0.1);
    border-left: 3px solid #5865f2;
}

/* New message highlight animation */
.chat-message.new-message {
    animation: highlightNew 2s ease;
}

@keyframes highlightNew {
    0% {
        background: rgba(88, 101, 242, 0.3);
    }
    100% {
        background: transparent;
    }
}

/* Auto-refresh indicator */
.chat-refresh-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-refresh-indicator.active {
    opacity: 1;
}

.chat-refresh-indicator .pulse-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Message actions on hover */
.chat-message-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    gap: 0.25rem;
}

.chat-message:hover .chat-message-actions {
    display: flex;
}

.chat-action-button {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-action-button:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.chat-action-button svg {
    width: 16px;
    height: 16px;
}

/* Empty state improvements */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

.chat-empty-state svg {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
}

.chat-empty-state h3 {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.chat-empty-state p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Character counter for input */
.chat-input-wrapper {
    position: relative;
    flex: 1;
}

.chat-character-counter {
    position: absolute;
    bottom: -1.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.chat-character-counter.warning {
    color: #ffa500;
}

.chat-character-counter.error {
    color: #ff4444;
}

/* Message timestamp tooltip */
.chat-message-time {
    position: relative;
    cursor: help;
}

.chat-message-time:hover::after {
    content: attr(data-full-time);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    z-index: 100;
}

/* Connection status indicator */
.chat-connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 68, 68, 0.1);
    border-top: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    font-size: 0.85rem;
}

.chat-connection-status.connected {
    background: rgba(76, 175, 80, 0.1);
    border-top-color: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.chat-connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Smooth height transition for messages container */
.chat-messages-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Embed and Attachment Styling */
.chat-embed {
    border-left: 4px solid #5865f2;
    background: rgba(88, 101, 242, 0.05);
    padding: 12px;
    border-radius: 4px;
    margin-top: 8px;
    max-width: 100%;
    word-wrap: break-word;
}

.chat-embed img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 8px;
}

.chat-message-attachment {
    margin-top: 8px;
}

.chat-message-attachment img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 6px;
    display: block;
}

.chat-message-file {
    margin-top: 8px;
}

.chat-message-file a {
    color: #5865f2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.chat-message-file a:hover {
    background: rgba(88, 101, 242, 0.2);
}

/* Better mobile responsiveness */
@media (max-width: 768px) {
    .chat-messages-container {
        height: 300px;
    }
    
    .chat-message {
        padding: 0.5rem;
    }
    
    .chat-message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .chat-message-author {
        font-size: 0.85rem;
    }
    
    .chat-message-text {
        font-size: 0.9rem;
    }
    
    .chat-send-form {
        padding: 1rem;
    }
}

/* Error state */
.chat-error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}

.chat-error-message svg {
    width: 48px;
    height: 48px;
    color: #ff4444;
}

.chat-error-message h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.chat-error-message p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.chat-retry-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}
/* Load More Button */
.chat-load-more {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.chat-load-more:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.chat-load-more svg {
    width: 20px;
    height: 20px;
}

.chat-load-more.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-load-more.loading svg {
    animation: spin 1s linear infinite;
}

/* Channel Lookup by ID */
.chat-channel-lookup {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.3);
    border-radius: 8px;
}

.channel-id-input-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    margin: 0.75rem 0 1rem 0;
}

.channel-id-input {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    min-width: 0;
}

.channel-id-input::placeholder {
    color: #808080;
}

.channel-id-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.lookup-btn {
    padding: 0.8rem 2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 120px;
}

.lookup-btn svg {
    width: 18px;
    height: 18px;
}

.channel-lookup-hint {
    font-size: 0.85rem;
    color: #b0b0b0;
    margin: 0.5rem 0;
}
/* Base: allow sliding when needed */
/* Base glass bottom bar */
.glass-bottombar {
  width: fit-content;
  max-width: 90vw;          /* IMPORTANT: prevents going out of screen */
  margin: 40px auto 20px;

  display: flex;
  gap: 20px;

  padding: 10px 25px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);

  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);

  overflow-x: auto;         /* 🔥 SLIDING ENABLED */
  white-space: nowrap;      /* prevents wrapping */
  scrollbar-width: none;    /* hides scrollbar (Firefox) */
}

.glass-bottombar::-webkit-scrollbar {
  display: none;            /* hides scrollbar (Chrome) */
}

/* Links */
.glass-bottombar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.2s ease;
  white-space: nowrap;      /* do NOT break text */
}

.glass-bottombar a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* -------------------------------
   RESPONSIVE: shrink padding + gap
-------------------------------- */

/* Tablets */
@media (max-width: 900px) {
  .glass-bottombar {
    gap: 14px;
    padding: 8px 20px;
  }
  .glass-bottombar a {
    font-size: 0.9rem;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .glass-bottombar {
    gap: 12px;
    padding: 8px 16px;
  }
  .glass-bottombar a {
    font-size: 0.85rem;
    padding: 6px 8px;
  }
}

/* Small phones */
@media (max-width: 430px) {
  .glass-bottombar {
    gap: 10px;
    padding: 6px 14px;
  }
  .glass-bottombar a {
    font-size: 0.8rem;
  }
}

/* Ultra small */
@media (max-width: 350px) {
  .glass-bottombar {
    gap: 8px;
    padding: 5px 12px;
  }
  .glass-bottombar a {
    font-size: 0.75rem;
  }
}