:root {
    --bg: #0f0f12;
    --bg-card: #1a1a1f;
    --text: #e4e4e7;
    --text-muted: #71717a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --border: #27272a;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.header {
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.form-group textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
    font-family: inherit;
}

.scan-result {
    margin-top: 1rem;
    font-size: 0.875rem;
}

.hidden {
    display: none !important;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    background: #3f3f46;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.bots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: border-color 0.15s;
}

.bot-card:hover {
    border-color: var(--accent);
}

.bot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.bot-name {
    font-weight: 600;
    font-size: 1rem;
}

.bot-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.bot-status.online {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.bot-status.offline {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.bot-url {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.bot-url a {
    color: var(--accent);
    text-decoration: none;
}

.bot-url a:hover {
    text-decoration: underline;
}

.bot-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.8rem;
}

.bot-stat {
    background: var(--bg);
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.bot-stat-label {
    color: var(--text-muted);
}

.bot-stat-value {
    font-weight: 600;
}

.form {
    max-width: 480px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.detail-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.detail-card-value {
    font-weight: 600;
}

.detail-users {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.user-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.85rem;
    max-height: 220px;
    overflow-y: auto;
}

.user-list li {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-id {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background: rgba(39, 39, 42, 0.85);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.user-tag {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: system-ui, -apple-system, sans-serif;
    text-decoration: none;
}

.user-tag:hover {
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.12);
}

.user-list a.user-tag:visited {
    color: #ffffff;
}

.detail-users .detail-card-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.error-msg {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}
