:root {
    --primary: #D63031;
    --primary-hover: #C0392B;
    --secondary: #FF7675;
    --accent: #DFE6E9;
    --bg: #1A0A0A;
    --bg-panel: rgba(30, 14, 14, 0.85);
    --border: rgba(255, 255, 255, 0.07);
    --text: #F0E6E6;
    --text-muted: #8B7878;
    --radius: 12px;
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(214, 48, 49, 0.08), transparent 50%),
        radial-gradient(circle at bottom right, rgba(255, 118, 117, 0.05), transparent 50%),
        var(--bg);
}

.app {
    width: 100%;
    max-width: 1200px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Header */
header {
    padding: 1.25rem 1.5rem;
    text-align: center;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-size: 0.9rem;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.25rem;
}

/* Panels */
.editor-panel,
.preview-panel {
    padding: 1.25rem;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

/* Editor groups */
.editor-group {
    margin-bottom: 0.75rem;
}

.editor-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.opt {
    opacity: 0.5;
    font-size: 0.7rem;
}

select,
input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    transition: var(--transition);
}

select:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.15);
}

textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    resize: vertical;
    tab-size: 2;
    line-height: 1.5;
    transition: var(--transition);
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.15);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
    margin-top: 0.5rem;
}

.btn.primary {
    background: var(--primary);
}

.btn.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Breakpoints */
.breakpoints {
    margin-top: 1rem;
}

.breakpoints h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.bp-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    background: rgba(214, 48, 49, 0.08);
    border-radius: 6px;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-family: monospace;
}

.bp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.bp-dot.active {
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

.bp-dot.inactive {
    background: var(--text-muted);
}

/* Preview */
.resize-wrapper {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.container-box {
    container-type: inline-size;
    background: rgba(0, 0, 0, 0.15);
    border: 2px dashed rgba(214, 48, 49, 0.3);
    border-radius: 8px;
    padding: 1rem;
    transition: width 0.15s ease;
    width: 400px;
    overflow: hidden;
}

.size-readout {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--secondary);
    background: rgba(214, 48, 49, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.preview-controls {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-controls label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="range"] {
    flex: 1;
    accent-color: var(--primary);
    height: 6px;
}

.preset-sizes {
    display: flex;
    gap: 0.4rem;
}

.size-btn {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Comparison */
.comparison {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.comparison h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.comparison-note {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--accent);
}

.muted {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Footer */
footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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