html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #1E1B4B;
    background: #F5F3FF;
    line-height: 1.5;
}

* { box-sizing: border-box; }

h1 {
    font-size: 24px;
    margin: 0 0 16px 0;
    font-weight: 700;
    color: #1E1B4B;
}

h2 {
    font-size: 16px;
    margin: 24px 0 12px;
    font-weight: 600;
    color: #374151;
}

p {
    margin: 0 0 12px 0;
    color: #4B5563;
}

a {
    color: #7C3AED;
}

code {
    background: #EDE9FE;
    color: #5B21B6;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

pre {
    background: #1E1B4B;
    color: #E0E7FF;
    padding: 12px 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Layout helpers */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Demo sections */
.demo-section {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.demo-section h2 {
    margin-top: 0;
    color: #1E1B4B;
}

.state {
    margin-top: 12px;
    color: #6B7280;
    font-size: 13px;
}

.loading-host {
    padding: 40px;
    text-align: center;
    color: #6B7280;
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 150ms ease, transform 80ms ease, box-shadow 150ms ease;
    background: #7C3AED;
    color: white;
    font-family: inherit;
}

button:hover, .btn:hover {
    background: #6D28D9;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

button:active, .btn:active {
    transform: scale(0.97);
}

/* Hero section */
.hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 48px 32px;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #2563EB 100%);
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.hero-circle-1 {
    width: 200px;
    height: 200px;
    top: -40px;
    right: -50px;
}

.hero-circle-2 {
    width: 120px;
    height: 120px;
    bottom: -30px;
    left: -30px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 20px rgba(139, 92, 246, 0.6));
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-divider {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
    margin: 0 auto 12px;
}

.hero-subtitle {
    font-size: 13px;
    color: #DDD6FE;
    letter-spacing: 0.5px;
    margin: 0;
}

.intro-text {
    text-align: center;
    font-size: 15px;
    color: #6B7280;
    margin-bottom: 28px;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.feature-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 200ms ease, transform 200ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12);
    transform: translateY(-2px);
}

.feature-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.feature-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1E1B4B;
    margin: 0 0 6px 0;
}

.feature-card p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 16px 0;
}

/* Status message */
.status-message {
    color: #6B7280;
    font-size: 13px;
    font-style: italic;
}

/* Toast config form */
.toast-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    align-items: center;
}

.toast-form label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.toast-form input[type="text"],
.toast-form select {
    padding: 6px 10px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: #1E1B4B;
}

.toast-form input[type="text"] {
    grid-column: 1 / -1;
}

.stepper-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper-row input[type="range"] {
    flex: 1;
    accent-color: #7C3AED;
}

.stepper-row span {
    font-size: 13px;
    color: #6B7280;
    min-width: 36px;
    text-align: right;
}

.toggle-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.toggle-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7C3AED;
}
