:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    padding: 1rem;
    max-width: 100%;
    margin: 0 auto;
}

h1, h2, h3 { color: #0f172a; margin-top: 0; }

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
}

.card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

textarea, input, select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 1rem;
    font-family: inherit;
}

textarea { min-height: 100px; resize: vertical; }

button, .btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

button:hover, .btn:hover { background-color: var(--primary-hover); }

.share-box {
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    word-break: break-all;
}

.rules-preview {
    font-size: 0.875rem;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 4px;
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.group-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 1rem;
    border-radius: 6px;
}

.group-card h3 { color: #1e40af; margin-bottom: 0.5rem; border-bottom: 2px solid #dbeafe; padding-bottom: 0.25rem; }
.group-card ul { list-style: none; padding: 0; margin: 0; }
.group-card li { padding: 0.25rem 0; }
.alert-success { background: #dcfce7; color: #166534; padding: 1rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }
.code-badge { font-size: 1.5rem; letter-spacing: 2px; font-weight: bold; color: #2563eb; background: #ffffff; padding: 0.2rem 0.6rem; border-radius: 4px; border: 1px dashed #2563eb; display: inline-block; }