/* Fonts */
body {
    font-family: 'Roboto', sans-serif;
    /* Closest free distinct look to gg sans */
    background-color: #36393f;
    color: #dcddde;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar (Servers) */
.sidebar {
    width: 72px;
    background-color: #202225;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #36393f;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #dcddde;
    font-weight: 500;
    position: relative;
}

.server-icon:hover,
.server-icon.active {
    background-color: #5865F2;
    border-radius: 16px;
    color: white;
}

.server-icon img {
    width: 28px;
    height: 28px;
}

.separator {
    width: 32px;
    height: 2px;
    background-color: #36393f;
    margin: 8px 0;
}

/* Channel List */
.channels {
    width: 240px;
    background-color: #2f3136;
    display: flex;
    flex-direction: column;
}

.server-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 0 rgba(4, 4, 5, 0.2);
    cursor: pointer;
    transition: background 0.2s;
}

.server-header:hover {
    background-color: #34373c;
}

.server-header h1 {
    font-size: 16px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.channel-group {
    padding: 16px 8px 0;
}

.group-label {
    font-size: 12px;
    font-weight: 700;
    color: #8e9297;
    text-transform: uppercase;
    padding-left: 8px;
    margin-bottom: 8px;
    display: block;
}

.channel {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    color: #8e9297;
    text-decoration: none;
    margin-bottom: 2px;
    font-weight: 500;
}

.channel:hover {
    background-color: #34373c;
    color: #dcddde;
}

.channel.active {
    background-color: #393c43;
    color: white;
}

.hash {
    font-size: 20px;
    margin-right: 6px;
    color: #72767d;
}

.user-panel {
    margin-top: auto;
    background-color: #292b2f;
    padding: 10px;
    display: flex;
    align-items: center;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-image: url('https://cdn.discordapp.com/embed/avatars/0.png');
    background-size: cover;
    margin-right: 8px;
    position: relative;
}

.avatar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #3ba55c;
    /* Online status */
    border: 3px solid #292b2f;
}

.user-info {
    font-size: 14px;
}

.username {
    color: white;
    font-weight: 600;
    display: block;
}

.discriminator {
    color: #b9bbbe;
    font-size: 12px;
}

/* Chat Area */
.chat-area {
    flex: 1;
    background-color: #36393f;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #26272d;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-header h3 {
    margin: 0 16px 0 0;
    color: white;
    font-size: 16px;
}

.topic {
    color: #b9bbbe;
    font-size: 14px;
    border-left: 1px solid #3f4147;
    padding-left: 16px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

/* Message Styles */
.message-group {
    display: flex;
    margin-bottom: 24px;
}

.message-group:hover {
    background-color: rgba(4, 4, 5, 0.07);
}

.avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-color: #5865F2;
    /* Default blue */
    margin-right: 16px;
    flex-shrink: 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.message-header .username {
    margin-right: 6px;
    cursor: pointer;
}

.message-header .username:hover {
    text-decoration: underline;
}

.bot-tag {
    background-color: #5865F2;
    color: white;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.timestamp {
    font-size: 12px;
    color: #72767d;
}

.message-body {
    color: #dcddde;
    font-size: 16px;
    line-height: 1.375rem;
}

.subtitle {
    font-style: italic;
    color: #b9bbbe;
    margin-bottom: 16px;
}

/* Embed */
.embed-container {
    display: flex;
    background-color: #2f3136;
    border-radius: 4px;
    border-left: 4px solid #5865F2;
    /* Embed color */
    max-width: 650px;
    margin-top: 8px;
    padding: 16px;
    /* Added inner padding */
    gap: 16px;
}

.embed-content {
    display: flex;
    width: 100%;
    gap: 20px;
}

.embed-text {
    flex: 1;
}

.embed-text h4 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 16px;
}

.embed-image img {
    max-width: 150px;
    border-radius: 4px;
}

.btn-discord {
    display: inline-block;
    background-color: #5865F2;
    color: white;
    padding: 10px 24px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 16px;
    transition: background-color 0.2s;
}

.btn-discord:hover {
    background-color: #4752c4;
}

/* Divider */
.divider {
    border-top: 1px solid #3f4147;
    margin: 24px 0;
    position: relative;
    text-align: center;
}

.divider-date {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #36393f;
    padding: 0 10px;
    font-size: 12px;
    color: #72767d;
}

/* Role Pills */
.role-list {
    margin-top: 8px;
}

.role-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
}

.role-pill.red {
    background-color: rgba(237, 66, 69, 0.1);
    color: #ed4245;
}

.role-pill.blue {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.role-pill.green {
    background-color: rgba(87, 242, 135, 0.1);
    color: #57f287;
}

/* Input Area */
.input-area {
    padding: 0 16px 24px;
    margin-top: auto;
}

.text-input {
    background-color: #40444b;
    border-radius: 8px;
    padding: 12px 16px;
    color: #72767d;
    display: flex;
    align-items: center;
    cursor: text;
}

.file-add {
    margin-right: 16px;
    background-color: #b9bbbe;
    color: #36393f;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.emoji-picker {
    margin-left: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    cursor: pointer;
}

.emoji-picker:hover {
    filter: none;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {

    .sidebar,
    .channels {
        display: none;
        /* Mobile view: hide sidebar for now to focus on content */
    }

    .app-container {
        flex-direction: column;
    }

    .chat-header h3 {
        font-size: 14px;
    }
}