body {
    background-color: #222222;
    color: #66cc66;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

body.sidebar-open {
    margin-left: 250px;
}

body.sidebar-closed {
    margin-left: 0;
}

.back-button {
    color: #66cc66;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 1rem;
}

.main-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 900px;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    background-color: #333333;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

h1 {
    margin-bottom: 1.5rem;
    font-size: 1.8em;
}

/* ---- Filters ---- */
.filters-panel {
    text-align: left;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.filter-group {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem 1.2rem;
}

.filter-label {
    display: block;
    font-weight: bold;
    color: #88e888;
    font-size: 1.05em;
    margin-bottom: 0.6rem;
    letter-spacing: 0.03em;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
}

.radio-option,
.check-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.95em;
}

.radio-option input,
.check-option input {
    accent-color: #66cc66;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Hair type grid */
.hair-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.type-category {
    background-color: #1e1e1e;
    border-radius: 6px;
    padding: 0.7rem;
    border: 1px solid #3a3a3a;
}

.type-category-label {
    font-size: 0.85em;
    color: #aaa;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-options {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.type-sub {
    color: #999;
    font-size: 0.8em;
    margin-left: 0.2rem;
}

.type-select-all {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.small-btn {
    background-color: #444;
    color: #66cc66;
    border: 1px solid #66cc66;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-family: monospace;
    transition: background-color 0.2s ease;
}

.small-btn:hover {
    background-color: #555;
}

.small-btn.secondary {
    color: #999;
    border-color: #666;
}

.small-btn.secondary:hover {
    background-color: #555;
    color: #aaa;
}

/* ---- Action buttons ---- */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.generate-btn {
    background-color: #66cc66;
    color: #222222;
    border: none;
    padding: 12px 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    font-family: monospace;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.generate-btn:hover {
    background-color: #88e888;
}

.copy-btn {
    background-color: #444;
    color: #66cc66;
    border: 1px solid #66cc66;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-family: monospace;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #555;
    color: #88e888;
    border-color: #88e888;
}

/* ---- Results ---- */
.results-container {
    text-align: left;
}

.section {
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 1.2rem;
}

.section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

h2 {
    margin: 0;
    font-size: 1em;
    color: #88e888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.item-container {
    padding-left: 10px;
}

.result-name {
    font-size: 1.25em;
    font-weight: bold;
    color: #66cc66;
    margin-bottom: 0.3rem;
}

.result-desc {
    font-size: 0.9em;
    color: #aaa;
}

.reroll-btn {
    background: none;
    color: #66cc66;
    border: 1px solid #66cc66;
    cursor: pointer;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    font-family: monospace;
    transition: background-color 0.2s ease;
}

.reroll-btn:hover {
    background-color: #444;
    border-color: #888;
}

.no-results {
    background-color: #3a1a1a;
    border: 1px solid #cc4444;
    color: #cc8888;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95em;
}

.hidden {
    display: none;
}

/* ---- About ---- */
.main-container {
    width: 100%;
    max-width: 900px;
    padding: 1rem;
    box-sizing: border-box;
}

.about-section {
    margin-top: 3rem;
}

.category-title {
    text-align: center;
    font-weight: bold;
    color: #88e888;
    font-size: 1.2em;
    margin-bottom: 1rem;
}

.about-content {
    text-align: left;
    padding: 0.5rem;
    color: #aaa;
    line-height: 1.6;
}

.about-content h3 {
    color: #66cc66;
    margin-top: 1.2rem;
}

.about-content p {
    margin-bottom: 0.8rem;
}

.about-content strong {
    color: #88e888;
}

/* ---- Footer ---- */
.footer {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

a {
    color: #66cc66;
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: #88e888;
    text-decoration: underline;
}

.coffee-link {
    text-align: center;
    margin-top: 1rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    body.sidebar-open,
    body.sidebar-closed {
        margin-left: 0;
    }

    .hair-type-grid {
        grid-template-columns: 1fr 1fr;
    }

    h1 {
        font-size: 1.4em;
    }

    .main-wrapper,
    .main-container,
    .footer {
        padding: 0.5rem;
    }

    .container {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hair-type-grid {
        grid-template-columns: 1fr;
    }
}
