/* ===== CSS Variables ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:chatadmin {
    --theme-color: #5865F2;
    --theme-color-dark: #4752C4;
    --theme-color-light: #7983F5;
    --bg-color-1: #202225;
    --bg-color-2: #2f3136;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ===== Base Styles ===== */
body {
    margin: 0;
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2));
    background-attachment: fixed;
    color: #dcddde;
    height: 100vh;
    display: flex;
}

/* ===== Navigation ===== */
nav {
    background-color: #2c2c3a;
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    justify-content: space-between;
    flex-shrink: 0;
}

nav button {
    background-color: #4b4b60;
    padding: 8px 16px;
    border-radius: 6px;
    margin: 0 6px;
    border: none;
    cursor: pointer;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
}

nav button:hover {
    background-color: #6c6c85;
}

/* ===== Main Content Area ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* ===== Chat Bubbles ===== */
.chat-message {
    background-color: #3a3a50;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    max-width: 70%;
    word-wrap: break-word;
}

.chat-message.user {
    background-color: #5c5cff;
    align-self: flex-end;
    color: white;
}

/* ===== Friend List ===== */
.friend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #2c2c3a;
}

.friend:hover {
    background-color: #3a3a50;
}

.friend .status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status.online {
    background-color: #4ade80; /* green */
}

.status.offline {
    background-color: #ef4444; /* red */
}

/* ===== Buttons ===== */
button {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover {
    opacity: 0.85;
}

.theme-btn {
    background-color: var(--theme-color) !important;
    color: white;
}

/* ===== Forms ===== */
input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    margin-bottom: 8px;
    background-color: #3a3a50;
    color: #fff;
}

input::placeholder {
    color: #b0b0b0;
}

/* ===== Message Bubbles ===== */
#messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#messages > div {
    word-wrap: break-word;
    word-break: break-word;
}

#messages .bubble {
    max-width: 60%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* ===== Iframe Pages Styling ===== */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #0f0f1e;
}

/* ===== Scrollbars ===== */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #2e3338;
    border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #202225;
    border-radius: 3px;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===== Profile Pictures & Avatars ===== */
.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
}

.profile-pic-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-pic-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.server-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    flex-shrink: 0;
}

.server-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* ===== Avatar Container ===== */
.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-container img {
    display: block;
}

/* ===== Message Bubble with Avatar ===== */
.message-with-avatar {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.message-with-avatar.right {
    flex-direction: row-reverse;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.message-content.right {
    align-items: flex-end;
}

.sender-name {
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0 0.5rem;
}
