@import 'voice.css';

:root {
    /* Color Palette - Discord-ish but darker/sleeker */
    --bg-primary: #36393f;
    --bg-secondary: #2f3136;
    --bg-tertiary: #202225;
    --bg-accent: #40444b;
    --text-normal: #dcddde;
    --text-muted: #72767d;
    --brand: #5865F2;
    --brand-hover: #4752C4;
    --success: #3ba55c;
    --danger: #ed4245;
    --warning: #faa61a;

    /* Layout */
    --server-list-width: 72px;
    --channel-list-width: 240px;
    --members-list-width: 240px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-normal);
    background-color: var(--bg-primary);
    overflow: hidden;
    /* Prevent body scroll */
}

/* Scrollbar Beautification */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #2b2d31;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: #1a1b1e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #111214;
}

/* Tooltip Animation */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: black;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    animation: fadeIn 0.1s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

a {
    color: var(--brand);
    text-decoration: none;
}

/* Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.full-h {
    height: 100%;
}

.full-w {
    width: 100%;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: url('../img/auth_bg.jpg') no-repeat center center fixed;
    /* Placeholder */
    background-size: cover;
}

.auth-box {
    background-color: var(--bg-primary);
    padding: 32px;
    border-radius: 5px;
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);
    width: 480px;
    animation: fadeIn 0.5s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-header h2 {
    color: #fff;
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px;
    background-color: var(--bg-tertiary);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    color: var(--text-normal);
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--brand);
    outline: none;
}

.btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 3px;
    background-color: var(--brand);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--brand-hover);
}

.auth-footer {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

.servers-sidebar {
    width: var(--server-list-width);
    background-color: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    overflow-y: auto;
}

.channels-sidebar {
    width: var(--channel-list-width);
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
}

.chat-area {
    flex: 1;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.members-sidebar {
    width: var(--members-list-width);
    background-color: var(--bg-secondary);
}

/* Components */
.server-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-radius 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-normal);
    position: relative;
}

.server-icon:hover,
.server-icon.active {
    border-radius: 16px;
    background-color: var(--brand);
    color: white;
}

.server-icon.home {
    background-color: var(--bg-accent);
}

.channel-item {
    padding: 8px 8px;
    margin: 2px 8px;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
}

.channel-item:hover,
.channel-item.active {
    background-color: var(--bg-accent);
    color: var(--text-normal);
}

.message {
    padding: 8px 16px;
    margin-top: 4px;
}

.message:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.message-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 4px;
}

.message-author {
    font-weight: 500;
    color: white;
    margin-right: 8px;
    cursor: pointer;
}

.message-author:hover {
    text-decoration: underline;
}

.message-time {
    font-size: 12px;
    color: var(--text-muted);
}

.message-content {
    color: var(--text-normal);
    white-space: pre-wrap;
}

.input-area {
    padding: 0 16px 24px 16px;
    margin-top: auto;
}

.chat-input {
    width: 100%;
    background-color: var(--bg-accent);
    border: none;
    border-radius: 8px;
    padding: 12px;
    color: var(--text-normal);
    outline: none;
}