/* FriendMatch – Design System */

:root {
    --purple-50:  #EEEDFE;
    --purple-400: #7F77DD;
    --purple-600: #534AB7;
    --purple-800: #3C3489;

    --teal-50:    #E1F5EE;
    --teal-400:   #1D9E75;
    --teal-600:   #0F6E56;

    --coral-50:   #FAECE7;
    --coral-400:  #D85A30;

    --amber-50:   #FAEEDA;
    --amber-400:  #EF9F27;

    --gray-50:    #F8F8F6;
    --gray-100:   #F1EFE8;
    --gray-200:   #D3D1C7;
    --gray-400:   #888780;
    --gray-600:   #5F5E5A;
    --gray-800:   #2C2C2A;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.06);
    --shadow-md:  0 4px 16px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────── */
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 500; }

a { color: var(--purple-600); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────── */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
}

.container--wide {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 0.5px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 5px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--gray-800);
    transition: border-color .15s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--purple-400);
    box-shadow: 0 0 0 3px var(--purple-50);
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: opacity .15s, transform .1s;
    text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
    background: var(--purple-600);
    color: #fff;
    width: 100%;
}
.btn--primary:hover { opacity: .9; }

.btn--ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}
.btn--ghost:hover { background: var(--gray-100); }

.btn--teal { background: var(--teal-400); color: #fff; }

/* ── Tags / Badges ──────────────────────────────────── */
.tag {
    display: inline-block;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    margin: 2px;
}
.tag--purple { background: var(--purple-50);  color: var(--purple-800); }
.tag--teal   { background: var(--teal-50);    color: var(--teal-600); }
.tag--coral  { background: var(--coral-50);   color: var(--coral-400); }
.tag--amber  { background: var(--amber-50);   color: var(--amber-400); }

/* ── Match-Score-Bar ─────────────────────────────────── */
.score-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}
.score-bar__fill {
    height: 100%;
    border-radius: 4px;
    background: var(--teal-400);
    transition: width .4s ease;
}
.score-bar__fill--good   { background: var(--teal-400); }
.score-bar__fill--medium { background: var(--purple-400); }
.score-bar__fill--low    { background: var(--amber-400); }

/* ── Avatar ─────────────────────────────────────────── */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: var(--purple-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--purple-800);
    flex-shrink: 0;
}
.avatar--sm  { width: 36px;  height: 36px;  font-size: 13px; }
.avatar--md  { width: 48px;  height: 48px;  font-size: 17px; }
.avatar--lg  { width: 80px;  height: 80px;  font-size: 26px; }

/* ── Navbar ─────────────────────────────────────────── */
.navbar {
    background: #fff;
    border-bottom: 0.5px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar__logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--purple-600);
    text-decoration: none;
}

.navbar__logo span { color: var(--teal-400); }

/* ── Bottom-Tabbar (Mobile) ─────────────────────────── */
.tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 0.5px solid var(--gray-200);
    display: flex;
    height: 58px;
    z-index: 100;
}

.tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: var(--gray-400);
    text-decoration: none;
    transition: color .15s;
}

.tabbar__item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.tabbar__item--active { color: var(--purple-600); }

/* ── Alerts ─────────────────────────────────────────── */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 1rem;
}
.alert--error   { background: #FEF2F2; color: #991b1b; border: 1px solid #fecaca; }
.alert--success { background: var(--teal-50); color: var(--teal-600); border: 1px solid #9FE1CB; }

/* ── Page padding (für Tabbar) ──────────────────────── */
.page { padding: 20px 0 80px; }

/* ── Divider ─────────────────────────────────────────── */
.divider { height: 0.5px; background: var(--gray-200); margin: 1rem 0; }

/* ── User-Card im Feed ───────────────────────────────── */
.user-card {
    background: #fff;
    border: 0.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.user-card__info { flex: 1; min-width: 0; }
.user-card__name { font-size: 15px; font-weight: 600; }
.user-card__sub  { font-size: 12px; color: var(--gray-400); }

.user-card__score {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal-600);
}
