* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #36393f;
    color: #dcddde;
    overflow: hidden;
    height: 100vh;
}

.discord-container {
    display: flex;
    height: 100vh;
}

/* Server Sidebar */
.server-sidebar {
    width: 72px;
    background-color: #202225;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
}

.server-icon {
    width: 48px;
    height: 48px;
    background-color: #36393f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.server-icon:hover {
    border-radius: 16px;
    background-color: #5865f2;
}

.server-icon.active {
    border-radius: 16px;
    background-color: #5865f2;
}

.server-icon.active::before {
    content: '';
    position: absolute;
    left: -16px;
    width: 8px;
    height: 40px;
    background-color: #fff;
    border-radius: 0 4px 4px 0;
}

.server-icon-text {
    font-weight: 600;
    font-size: 18px;
    color: #fff;
}

.server-separator {
    width: 32px;
    height: 2px;
    background-color: #36393f;
    border-radius: 1px;
}

/* Channel Sidebar */
.channel-sidebar {
    width: 240px;
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
}

.server-header {
    height: 48px;
    padding: 12px 16px;
    border-bottom: 1px solid #202225;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.server-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.dropdown-arrow {
    color: #b9bbbe;
    font-size: 12px;
}

.channel-list {
    flex: 1;
    padding: 16px 8px;
    overflow-y: auto;
}

.channel-category {
    display: flex;
    align-items: center;
    padding: 0 8px;
    margin-bottom: 4px;
    color: #8e9297;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.category-arrow {
    margin-right: 4px;
    font-size: 10px;
}

.channel {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 1px 0;
    border-radius: 4px;
    cursor: pointer;
    color: #8e9297;
    transition: all 0.15s ease;
}

.channel:hover {
    background-color: #34373c;
    color: #dcddde;
}

.channel.active {
    background-color: #393c43;
    color: #fff;
}

.channel-hash {
    margin-right: 6px;
    font-size: 20px;
    font-weight: 300;
}

.channel-name {
    font-size: 16px;
    font-weight: 500;
}

.user-area {
    height: 52px;
    background-color: #292b2f;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
}

.username {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 18px;
}

.user-status {
    font-size: 12px;
    color: #b9bbbe;
    line-height: 16px;
}

.user-controls {
    display: flex;
    gap: 4px;
}

.control-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9bbbe;
    font-size: 16px;
    transition: all 0.15s ease;
}

.control-btn:hover {
    background-color: #40444b;
    color: #dcddde;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #36393f;
    display: flex;
    flex-direction: column;
}

.chat-header {
    height: 48px;
    border-bottom: 1px solid #40444b;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.chat-header .channel-hash {
    color: #8e9297;
    font-size: 24px;
    font-weight: 300;
}

.channel-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.channel-description {
    color: #8e9297;
    font-size: 14px;
    margin-left: 8px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message {
    display: flex;
    padding: 2px 0;
    position: relative;
}

.message:hover {
    background-color: #32353b;
    margin: 0 -16px;
    padding: 2px 16px;
    border-radius: 4px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    margin-right: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

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

.message-username {
    font-weight: 600;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.message-username:hover {
    text-decoration: underline;
}

.message-username.moderator {
    color: #5865f2;
}

.message-username.moderator::after {
    content: " MOD";
    font-size: 10px;
    background-color: #5865f2;
    color: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 700;
}

.message-timestamp {
    font-size: 12px;
    color: #a3a6aa;
    font-weight: 500;
}

.message-text {
    color: #dcddde;
    font-size: 16px;
    line-height: 1.375;
    word-wrap: break-word;
}

/* Highlight for user pings within messages */
.user-ping {
    background-color: rgba(88, 101, 242, 0.3); /* Light blue background for ping */
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #fff;
}

.message-actions {
    position: absolute;
    top: -8px;
    right: 16px;
    background-color: #40444b;
    border: 1px solid #2f3136;
    border-radius: 4px;
    padding: 4px;
    display: none;
    gap: 4px;
}

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

.action-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9bbbe;
    font-size: 16px;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background-color: #5865f2;
    color: #fff;
}

.action-btn.ban-btn:hover {
    background-color: #ed4245;
}

.message-input-area {
    padding: 16px;
}

.message-input-container {
    background-color: #40444b;
    border-radius: 8px;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#message-input {
    flex: 1;
    background: none;
    border: none;
    color: #dcddde;
    font-size: 16px;
    outline: none;
}

#message-input::placeholder {
    color: #72767d;
}

#send-button {
    background-color: #5865f2;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
}

#send-button:hover {
    background-color: #4752c4;
}

/* Member List */
.member-list {
    width: 240px;
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
}

.member-list-header {
    padding: 16px 16px 8px;
    border-bottom: 1px solid #40444b;
}

.member-count {
    font-size: 12px;
    font-weight: 600;
    color: #8e9297;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.member-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.member-category {
    margin-bottom: 8px;
}

.member-category-title {
    font-size: 12px;
    font-weight: 600;
    color: #8e9297;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0 8px 4px;
}

.member {
    display: flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.member:hover {
    background-color: #34373c;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    position: relative;
}

.member-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid #2f3136;
}

.member-status.online {
    background-color: #3ba55d;
}

.member-status.idle {
    background-color: #faa81a;
}

.member-status.dnd {
    background-color: #ed4245;
}

.member-status.offline {
    background-color: #747f8d;
}

.member-name {
    font-size: 16px;
    font-weight: 500;
    color: #dcddde;
}

.member.moderator {
    background-color: rgba(88, 101, 242, 0.1);
    border-left: 3px solid #5865f2;
    padding-left: 5px;
}

.member.moderator .member-name {
    color: #5865f2;
    font-weight: 600;
}

.member.moderator .member-name::after {
    content: " MOD";
    font-size: 10px;
    background-color: #5865f2;
    color: #fff;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 6px;
    font-weight: 700;
}

.member-actions {
    position: absolute;
    right: 8px;
    display: none;
    gap: 4px;
}

.member:hover .member-actions {
    display: flex;
}

.member-action-btn {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9bbbe;
    font-size: 12px;
    transition: all 0.15s ease;
}

.member-action-btn:hover {
    background-color: #40444b;
    color: #fff;
}

.member-action-btn.ban:hover {
    background-color: #ed4245;
}

/* Points display */
.points-display {
    background-color: #292b2f;
    margin: 8px;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #5865f2;
    text-align: center;
}

.points-label {
    font-size: 12px;
    color: #8e9297;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.points-value {
    font-size: 24px;
    font-weight: 700;
    color: #5865f2;
}

/* Resource Bars */
.resource-bar-container {
    background-color: #292b2f;
    margin: 0 8px 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #40444b;
    text-align: center;
}

.resource-label {
    font-size: 12px;
    color: #8e9297;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.resource-fill-wrapper {
    background-color: #202225;
    border-radius: 4px;
    height: 16px;
    overflow: hidden;
    position: relative;
}

.resource-fill {
    height: 100%;
    background-color: #3ba55d;
    width: 100%;
    transition: width 0.3s ease-out, background-color 0.3s ease-out;
    position: absolute;
    left: 0;
    top: 0;
}

.resource-fill.stamina-fill {
    background-color: #5865f2;
}

.resource-fill.hunger-fill {
    background-color: #faa81a;
}

/* Color change for low resources */
.resource-fill.low {
    background-color: #ed4245 !important;
}

.resource-value {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    z-index: 1;
}

.resource-control-btn {
    font-size: 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: #36393f;
    border-radius: 8px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
}

.modal-header {
    padding: 16px 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #b9bbbe;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background-color: #40444b;
    color: #fff;
}

.modal-body {
    padding: 16px;
}

.modal-body p {
    color: #dcddde;
    font-size: 16px;
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel, .btn-ban {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel {
    background: none;
    color: #b9bbbe;
}

.btn-cancel:hover {
    background-color: #40444b;
    color: #fff;
}

.btn-ban {
    background-color: #ed4245;
    color: #fff;
}

.btn-ban:hover {
    background-color: #c73e41;
}

/* Points feedback */
.points-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #36393f;
    border: 2px solid;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    z-index: 1001;
    animation: fadeInOut 2s ease-in-out forwards;
}

.points-feedback.positive {
    border-color: #3ba55d;
    color: #3ba55d;
}

.points-feedback.negative {
    border-color: #ed4245;
    color: #ed4245;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}

/* Typing indicator */
.typing-indicator {
    padding: 8px 16px;
    color: #8e9297;
    font-size: 14px;
    font-style: italic;
}

.typing-dots {
    display: inline-block;
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0; }
    30% { opacity: 1; }
}

/* Rules channel styles */
.rules-message {
    background-color: #2f3136;
    border: 1px solid #40444b;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0;
}

.rules-title {
    color: #5865f2;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 12px;
}

.rule-item {
    margin: 8px 0;
    color: #dcddde;
    font-size: 16px;
    line-height: 1.5;
}

.rule-number {
    color: #5865f2;
    font-weight: 600;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2e3136;
}

::-webkit-scrollbar-thumb {
    background: #202225;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a1d21;
}

/* Menu buttons */
.menu-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.order-menu-button {
    background-color: #5865f2;
    color: #fff;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.order-menu-button:hover {
    background-color: #4752c4;
}

/* New: Sleep button style */
.sleep-button {
    background-color: #5865f2;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 8px;
    width: calc(100% - 16px);
    transition: background-color 0.2s ease;
}

.sleep-button:hover {
    background-color: #4752c4;
}

/* New: Raid modal specific styles */
.modal.raid-modal .modal-header {
    background-color: #ed4245;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 10px 16px;
}

.modal.raid-modal .modal-header h3 {
    color: #fff;
    font-size: 22px;
    text-align: center;
    width: 100%;
}

.modal.raid-modal .modal-close {
    display: none; /* Hide close button for raid modal, force button click */
}

.modal.raid-modal .raid-message {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* New: Sleeping overlay styles */
.sleeping-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Higher than other modals */
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    backdrop-filter: blur(5px); /* Initial blur */
    animation: fadeInBlur 0.5s ease-out forwards; /* Animation for showing */
}

/* Animation for showing the overlay */
@keyframes fadeInBlur {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

/* Animation for hiding the overlay (reverse of showing) */
.sleeping-overlay.hide-animation {
    animation: fadeOutBlur 0.5s ease-in forwards;
}

@keyframes fadeOutBlur {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.sleeping-text {
    /* Optional: Add text specific styles */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* New: Low hunger blur effect */
body.low-hunger-blur {
    transition: backdrop-filter 0.5s ease-out;
    backdrop-filter: blur(3px); /* Apply a slight blur */
}