:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --eco: #10B981;
    --eco-hover: #059669;
    --bg: #F9FAFB;
    --surface: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    padding: 2rem 1rem;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid transparent;
    border-bottom-color: var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Panels */
.panel {
    display: none;
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s ease;
}

.panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input[type="number"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.components-section {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px dashed var(--border);
}

.components-section h4 {
    margin-bottom: 0.25rem;
}

.helper {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-row .form-group { margin-bottom: 0; }

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

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

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

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

.btn-secondary {
    width: 100%;
    padding: 1rem;
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background-color: var(--bg);
}

/* Results */
.results {
    margin-top: 2rem;
    animation: fadeIn 0.4s ease;
}

.results.hide {
    display: none;
}

.results h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border-left: 6px solid var(--primary);
}

.result-card.component-card {
    border-left-color: var(--eco);
}

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

.badge {
    background: var(--bg);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.message {
    font-size: 1.1rem;
    color: var(--text-main);
}

.highlight {
    color: var(--primary);
    text-transform: capitalize;
}
