/* Mappa Web UI Styles */

:root {
    color-scheme: light dark;
    --bg-primary: light-dark(#f5f5f7, #1a1a2e);
    --bg-secondary: light-dark(#ffffff, #16213e);
    --bg-tertiary: light-dark(#e5e5e7, #0f3460);
    --text-primary: light-dark(#1d1d1f, #eee);
    --text-secondary: light-dark(#6e6e73, #aaa);
    --accent: light-dark(#d63050, #e94560);
    --accent-hover: light-dark(#e94560, #ff6b6b);
    --border: light-dark(#d2d2d7, #333);
    --success: #00d26a;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;
    --font-sans: system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

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

section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

textarea,
input[type="text"],
select {
    width: 100%;
    padding: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    resize: vertical;
}

textarea {
    min-height: 200px;
    line-height: 1.5;
}

textarea:focus,
input:focus,
select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-color: var(--accent);
}

select {
    cursor: pointer;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent);
}

.options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.options .checkbox-group {
    grid-column: span 2;
}

@media (max-width: 600px) {
    .options {
        grid-template-columns: 1fr;
    }
    .options .checkbox-group {
        grid-column: 1;
    }
}

button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

#generate-btn {
    width: 100%;
    background: var(--accent);
    color: white;
}

#generate-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

#generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.output-section {
    display: flex;
    flex-direction: column;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.output-header label {
    font-weight: 500;
    color: var(--text-secondary);
}

#copy-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

#copy-btn:hover:not(:disabled) {
    background: var(--accent);
}

#copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#output {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    overflow: auto;
    min-height: 300px;
}

#output code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

footer {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .separator {
    margin: 0 0.5rem;
}
