:root {
    --bg: #0a0a0a;
    --panel: #141414;
    --panel-2: #1c1c1c;
    --border: #2a2a2a;
    --text: #f5f5f5;
    --muted: #9a9a9a;
    --accent: #ffffff;
    --accent-contrast: #0a0a0a;
    --danger: #e5484d;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
    min-height: 100vh;
}

a { color: inherit; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--muted);
}

.user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.center-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 24px;
    text-align: center;
    padding: 24px;
}

.logo-big {
    width: 84px;
    height: 84px;
    border-radius: 20px;
}

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 20px; margin: 0 0 4px; }
p.subtitle { color: var(--muted); margin: 0 0 28px; font-size: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--accent-contrast);
    border: none;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { opacity: 0.88; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.guild-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.guild-card:hover { border-color: #4a4a4a; }

.guild-card img, .guild-card .fallback-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--panel-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.guild-card span { font-weight: 600; font-size: 14px; }

.empty-state {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: var(--muted);
    margin-top: 20px;
}

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

.field { margin-bottom: 20px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.field .hint {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    margin-top: 6px;
}

select, input[type="text"] {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 18px;
}

.back-link:hover { color: var(--text); }

.banner {
    background: #10301c;
    border: 1px solid #1e5a35;
    color: #7ee2a2;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
}

form .actions {
    display: flex;
    justify-content: flex-end;
}
