/* ===== VARIABLES & THÈME ===== */
:root {
    --bg-main: #0f172a;
    --bg-container: rgba(30, 41, 59, 0.7);
    --accent: #e94560;
    --accent-hover: #ff5e78;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --msg-bg: rgba(255, 255, 255, 0.03);
}

/* ===== GLOBAL & RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: radial-gradient(circle at top right, #1e1e3f, #0f172a);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: var(--bg-container);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

h1 {
    font-weight: 800;
    background: linear-gradient(to right, #e94560, #ff8096);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* ===== FORMULAIRES ===== */
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: border 0.2s;
}

input:focus {
    border-color: var(--accent);
}

button {
    background: linear-gradient(135deg, var(--accent), #ff5e78);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* ===== INTERFACE DU CHAT ===== */
body:has(#chat-box) .container {
    max-width: 900px;
    width: 95%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    background: var(--input-bg);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    background: var(--msg-bg);
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-content {
    flex-grow: 1;
    line-height: 1.5;
    font-size: 0.95rem;
}

.delete-btn {
    background: rgba(233, 69, 96, 0.1);
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.message:hover .delete-btn {
    opacity: 1;
}

.timestamp {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.msg-admin { color: #fbbf24 !important; }

.password-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.password-dot.green { background: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.password-dot.red { background: #ef4444; }

.input-area {
    display: flex;
    gap: 12px;
    background: var(--input-bg);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.input-area input { margin-bottom: 0; border: none; background: transparent; }

#emoji-btn { background: transparent; font-size: 1.4rem; padding: 0 10px; }

#emoji-menu {
    display: none;
    position: absolute;
    bottom: 80px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 15px;
    z-index: 1000;
}
