/* StreamTeamTree — dark control-room theme, built for a Twitch team hub */

:root {
    --bg: #161616;
    --panel: #17171d;
    --panel-raised: #1f1f28;
    --line: #2a2a35;
    --text: #e9e9f0;
    --text-dim: #9a9aab;
    --accent: #9146ff;      /* Twitch purple */
   /* --accent-soft: #b98bff; */
    --accent-soft: color-mix(in srgb, var(--accent), white 20%);
    --live: #ff4d67;
    --ok: #3ddc97;
    --radius: 10px;
    --font-display: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: color-mix(in srgb, var(--bg), var(--accent) 2%);
    color: var(--text);
    font-family: var(--font-display);
    line-height: 1.5;
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-soft);
    outline-offset: 2px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.site-header .brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

.site-header nav a {
    margin-left: 20px;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.site-header nav a:hover {
    color: var(--text);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    min-height: 70vh;
}

.site-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.displayname {
    color: var(--accent);
}

.subtitle {
    color: var(--text-dim);
    margin-top: 0;
    margin-bottom: 28px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 18px;
}

.grid { display: grid; gap: 16px; }

.grid.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Schedule list */
.schedule-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item .when {
    font-family: var(--font-mono);
    color: var(--accent-soft);
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 150px;
}

/* WHO block becomes identity cluster */
.schedule-item .who {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* User link + avatar grouping */
.schedule-item .user-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
}

/* Avatar (circular identity marker) */
.schedule-item .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: var(--panel-raised);
}

/* Optional emphasis on name */
.schedule-item .name {
    color: var(--text);
}

/* Subtle hover identity feedback */
.schedule-item .user-link:hover .avatar {
    border-color: var(--accent-soft);
}

/* Badge system */
.badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--panel-raised);
    color: var(--text-dim);
    margin-left: 8px;
}

.badge.recurring {
    color: var(--ok);
}

/* Link tree */
.linktree {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}

.linktree .avatar-ring {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--live));
    margin: 0 auto 16px;
}

.link-btn {
    display: block;
    background: var(--panel-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 600;
    transition: border-color 0.15s, transform 0.1s;
}

.link-btn:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Forms */
label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 14px 0 6px;
}

input[type=text],
input[type=password],
input[type=url] {
    width: 100%;
    background: var(--panel-raised);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 0.95rem;
}

button,
.btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    margin-top: 16px;
}

button:hover,
.btn:hover {
    background: #a463ff;
    text-decoration: none;
}

button.secondary,
.btn.secondary {
    background: var(--panel-raised);
    border: 1px solid var(--line);
    color: var(--text);
}

button.danger,
.btn.danger {
    background: transparent;
    border: 1px solid var(--live);
    color: var(--live);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
}

th {
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.flash.success {
    background: rgba(61, 220, 151, 0.12);
    color: var(--ok);
    border: 1px solid rgba(61, 220, 151, 0.3);
}

.flash.error {
    background: rgba(255, 77, 103, 0.12);
    color: var(--live);
    border: 1px solid rgba(255, 77, 103, 0.3);
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--live);
    margin-right: 6px;
    box-shadow: 0 0 0 0 rgba(255,77,103,0.5);
}


.profile-avatar{
    width:120px;
    margin:0 auto 16px;
    text-align:center;
    position: relative;
}

.profile-avatar img{
    width:120px;
    height:120px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid var(--line);
    display:block;
    margin:0 auto;
}

.profile-avatar.live img{
    border-color: var(--live);
}

.live-badge{
    display:inline-block;
    margin-top:8px;
    background:#e91916;
    color:#fff;
    font-size:.75rem;
    font-weight:700;
    letter-spacing:.08em;
    padding:4px 12px;
    border-radius:4px;
}