:root {
    --bg-main: #0d0f14;
    --bg-card: #151922;
    --bg-card-hover: #1b202c;
    --bg-input: #10131a;
    --border-color: #252b38;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: rgba(13, 15, 20, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.logo-icon {
    width: 28px;
    height: 28px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-icon::before,
.logo-icon::after {
    content: '';
    position: absolute;
    background: var(--accent);
}

.logo-icon::before {
    width: 12px;
    height: 2px;
}

.logo-icon::after {
    width: 2px;
    height: 12px;
}

.nav-badge {
    font-size: 0.75rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero {
    padding: 48px 0 32px;
    text-align: center;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 28px;
    font-size: 1rem;
}

.sandbox {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

.preview-box {
    height: 240px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: radial-gradient(circle at 30% 30%, #3b4252 0%, #1e222a 60%, #111318 100%);
}

.preview-bg-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 8px;
    border-radius: 4px;
}

.bg-switcher {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
}

.bg-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.bg-btn.active {
    border-color: var(--accent);
    color: var(--accent);
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-item.full-width {
    grid-column: span 2;
}

.control-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.control-item input[type="range"] {
    accent-color: var(--accent);
    cursor: pointer;
}

.color-dots {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.c-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}

.c-dot.active {
    border-color: #fff;
    transform: scale(1.1);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
}

.filters {
    display: flex;
    gap: 8px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 18px;
    margin-bottom: 60px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card:hover {
    transform: translateY(-3px);
    background: var(--bg-card-hover);
    border-color: #363f52;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.player-team {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.card-crosshair-view {
    height: 110px;
    background: radial-gradient(circle, #2a303d 0%, #14171f 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.code-box {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    width: 100%;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent);
    color: #000;
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.ch-render {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-line {
    position: absolute;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--success);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: 28px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .sandbox {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.75rem;
    }
}

