@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-hover: #161616;
    --bg-input: #0d0d0d;
    --border: #1a1a1a;
    --border-light: #222222;
    --text: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --white: #ffffff;
    --radius: 10px;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
}

.panel-container { max-width: 800px; }

/* Header */
.header {
    text-align: center;
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.bot-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 2px solid var(--border-light);
    overflow: hidden;
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 32px;
}

.stat-item { text-align: center; }

.stat-value {
    font-size: 24px;
    font-weight: 600;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.card:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.guild-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-secondary);
    object-fit: cover;
    flex-shrink: 0;
}

.guild-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--white);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.card-info { flex: 1; min-width: 0; }

.guild-name {
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.guild-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.guild-meta svg {
    opacity: 0.6;
}

/* Panel Header */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
    transition: color 0.2s;
}

.back-btn:hover { color: var(--text); }

.panel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.panel-header .guild-icon {
    width: 56px;
    height: 56px;
}

.panel-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.panel-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 2px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
    color: var(--text);
    border-bottom-color: var(--white);
}

.tab-btn svg { opacity: 0.7; }
.tab-btn.active svg { opacity: 1; }

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section Card */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.section-title .icon {
    width: 32px;
    height: 32px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Toggle */
.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    transition: 0.2s;
    border-radius: 50px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: 0.2s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background: var(--white);
    border-color: var(--white);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--bg);
}

/* Form */
.form-group { margin-bottom: 20px; }

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

label .hint {
    color: var(--text-muted);
    font-weight: 400;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-light);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    min-height: 80px;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Search */
.search-container { position: relative; }

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-item:hover { background: var(--bg-hover); }

.search-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.search-item-name {
    font-size: 14px;
    font-weight: 500;
}

.search-item-id {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tags */
.whitelist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
}

.tag img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.tag-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}

.tag-remove:hover { color: var(--text); }

/* Submit */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--white);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.btn-submit:hover { opacity: 0.9; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: var(--white);
    color: var(--bg);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    animation: slideUp 0.3s ease;
    z-index: 1000;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 404 */
.error-page {
    text-align: center;
    padding: 120px 20px;
}

.error-code {
    font-size: 100px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 16px;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--white);
    color: var(--bg);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn:hover { opacity: 0.9; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }