:root {
    --bg: #0f172a;
    --bg-alt: #1e293b;
    --card: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --border: #334155;
}

body.light-mode {
    --bg: #f8fafc;
    --bg-alt: #e2e8f0;
    --card: #ffffff;
    --text: #0f172a;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.25s, color 0.25s;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    gap: 16px;
}

.logo {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.logo strong {
    color: var(--primary);
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary);
}

#theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Hero */
.hero {
    padding: 72px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.badge {
    display: inline-block;
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    max-width: 640px;
    margin: 0 auto 28px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Botões */
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.full-width {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-outline:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

/* Seções e Cards */
.section {
    padding: 64px 0;
}

.alt-bg {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

h2 {
    font-size: 1.85rem;
    margin-bottom: 24px;
}

.subtitle {
    color: var(--text-muted);
    margin-top: -16px;
    margin-bottom: 28px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Tabela */
.table-wrapper {
    overflow-x: auto;
    background-color: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: rgba(59, 130, 246, 0.08);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Gerador Interativo */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    font-size: 0.95rem;
}

.backlog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.story-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.story-item {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.story-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    margin-bottom: 6px;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    .hero h1 {
        font-size: 1.9rem;
    }
    .tool-grid {
        grid-template-columns: 1fr;
    }
}
