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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.5;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    color: #424242;
    font-size: 0.9rem;
}

p {
    margin-bottom: 0.75rem;
}

#app {
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    gap: 0.2rem;
    justify-content: flex-start;
}

.header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.2s;
}

.header a:hover {
    color: #1b5e20;
}

h1, h2 {
    font-weight: 500;
    color: #1b5e20;
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }

.symbolInputField {
    width: 3rem;
}

.symbolsContainer {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

.grammarEditor,
.automatonSelectSection,
.buildOptionsSection,
.visualizeOptionsSection,
.buildSection {
    margin-bottom: 2rem;
}

input[type="text"],
input[type="number"],
select {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

button {
    background: #2e7d32;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #ffffff;
}

.addGrammarElementButton {
    padding: 0.4rem 0.4rem;
    transition: background 0.2s;
}

.addGrammarElementButton:hover {
    background: #1b5e20;
}

.removeSymbolButton,
.removeRuleButton {
    background: #cc0440;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.removeSymbolButton:hover,
.removeRuleButton:hover {
    background: #b71c1c;
}

#buildButton {
    padding: 0.5rem;
    font-size: 1rem;
}

#buildButton:hover {
    background: #1b5e20;
}

#buildContainer {
    margin-top: 1rem;
}

.switchOperationButton {
    padding: 0.2rem 0.3rem;
    font-size: 1rem;
}

#navigationControls {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

#goStepButton {
    font-size: 1.3rem;
}