/* Good Friends Chat. Public pages only. */

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: #f3ecdf;
    color: #2c2416;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

body.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #fffdf8;
    border-bottom: 1px solid #eadfce;
}

.brand { font-size: 20px; font-weight: 800; }
.mark { margin: 0 0 8px; font-weight: 800; color: #c45c26; }

.user { display: flex; align-items: center; gap: 12px; }

main { max-width: 720px; margin: 0 auto; padding: 28px 20px 64px; }

h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; }

.card {
    width: min(440px, 100%);
    background: #fffdf8;
    border: 1px solid #eadfce;
    border-radius: 18px;
    padding: 22px 22px 26px;
    box-shadow: 0 10px 30px rgba(80, 48, 16, 0.06);
}

.card.wide { width: min(560px, 100%); }

.welcome {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
    margin: 8px 0 16px;
    background: #f6e7d4;
}

.muted { color: #6f6254; }
.error { color: #a33b32; }
.note {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff4e4;
    color: #6a4a1e;
}
.hidden { display: none; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

a.button, button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

a.button { border: 1px solid #e2d3bf; background: #fff; color: #2c2416; }
a.button.primary, button.primary {
    background: #e07a3d;
    border-color: #e07a3d;
    color: #fff;
}

label { display: block; margin: 14px 0 6px; font-size: 15px; color: #6f6254; }

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2d3bf;
    background: #fff;
    color: inherit;
    font-size: 17px;
}

button {
    font: inherit;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid #e2d3bf;
    background: #fff;
    color: inherit;
    padding: 10px 16px;
}

button.primary { color: #fff; }
button.primary:hover, a.button.primary:hover { background: #c9662c; }

button.link {
    background: none;
    border: none;
    color: #c45c26;
    padding: 0;
    font-weight: 700;
}

button.big {
    display: block;
    width: 100%;
    font-size: 22px;
    padding: 16px;
    margin-top: 18px;
    border-radius: 14px;
}

button:disabled { opacity: 0.55; cursor: default; }

.back { margin: 16px 0 0; }
.back a { color: #c45c26; }

.wait {
    display: flex;
    gap: 8px;
    height: 18px;
    margin: 18px 0;
}

.wait span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e07a3d;
    animation: pulse 1s infinite ease-in-out;
}

.wait span:nth-child(2) { animation-delay: 0.15s; }
.wait span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.statuses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #eadfce;
    color: #6f6254;
    font-size: 15px;
}

.chip.on { color: #1d7a45; border-color: #b7e0c6; background: #f1fbf5; }

.level {
    height: 12px;
    margin-top: 16px;
    border-radius: 999px;
    background: #f6e7d4;
    overflow: hidden;
}

#level-bar {
    height: 100%;
    width: 0%;
    background: #e07a3d;
}

#message { min-height: 24px; margin-top: 14px; }

@media (max-width: 640px) {
    h1 { font-size: 28px; }
    .welcome { height: 190px; }
    .actions { flex-direction: column; }
    a.button, button.button { width: 100%; }
    main { padding: 20px 16px 48px; }
    header { padding: 12px 16px; }
}
