:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary: #10B981;
    --bg: #F1F5F9;
    --card: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 12px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   HEADER & NAV
   ========================================================= */
header {
    background: var(--primary);
    color: white;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
    position: relative;
    z-index: 200;
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 12px;
}

.logo {
    font-size: 21px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.logo span { color: #93C5FD; }

/* Hamburger (mobile only) */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.15s;
}

.hamburger:hover { background: rgba(255,255,255,0.15); }

/* Nav container */
#nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Group */
.nav-group {
    position: relative;
}

.nav-group-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.88);
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.nav-group-btn::after {
    content: '▾';
    font-size: 10px;
    opacity: 0.65;
}

.nav-group:hover .nav-group-btn,
.nav-group-btn:focus {
    background: rgba(255,255,255,0.18);
    color: white;
    outline: none;
}

/* Dropdown panel */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 500;
    overflow: hidden;
    padding: 8px 0 6px;
}

.nav-group:hover .nav-dropdown,
.nav-group.open .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #1E293B;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.1s;
}

.nav-dropdown a:hover {
    background: #F1F5F9;
    color: var(--primary);
}

/* =========================================================
   MAIN
   ========================================================= */
main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 20px;
    width: 100%;
}

/* PAGE TITLE */
.page-title {
    text-align: center;
    margin-bottom: 28px;
}

.page-title h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.page-title p { color: var(--text-light); font-size: 15px; }

/* =========================================================
   CATEGORY SECTIONS (index)
   ========================================================= */
.category-section {
    margin-bottom: 36px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.category-icon { font-size: 22px; line-height: 1; }

.category-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

/* =========================================================
   CARD
   ========================================================= */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
    margin-bottom: 20px;
}

/* =========================================================
   AD SPACE
   ========================================================= */
.ad-space {
    background: #F8FAFC;
    border: 2px dashed #CBD5E1;
    border-radius: 8px;
    text-align: center;
    color: #94A3B8;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

/* =========================================================
   BIG VALUE
   ========================================================= */
.big-value {
    font-size: 46px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 14px 0;
    letter-spacing: -1px;
    word-break: break-all;
}

.sub-value {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 4px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #CBD5E1; }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: #059669; }

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 18px;
}

/* =========================================================
   INPUTS
   ========================================================= */
input[type="number"],
input[type="text"],
input[type="url"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text);
    background: white;
    transition: border-color 0.15s;
    outline: none;
    font-family: inherit;
}

input[type="number"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus { border-color: var(--primary); }

textarea { resize: vertical; min-height: 150px; }

select { appearance: none; cursor: pointer; }

/* CONVERTER LABEL */
.converter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    margin-top: 14px;
}

.converter-label:first-child { margin-top: 0; }

/* =========================================================
   PRICE GRID (BTC)
   ========================================================= */
.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.price-box {
    background: var(--bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.price-box .currency {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.price-box .value { font-size: 26px; font-weight: 700; }
.price-box .value.usd { color: #2563EB; }
.price-box .value.brl { color: #10B981; }

/* UPDATE INFO */
.update-info {
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
    margin-top: 12px;
}

/* =========================================================
   INFO LIST (Meu IP)
   ========================================================= */
.info-list { list-style: none; margin-top: 20px; }

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.info-list li:last-child { border-bottom: none; }
.info-list .label { color: var(--text-light); }
.info-list .value { font-weight: 600; }

/* =========================================================
   TOOLS GRID
   ========================================================= */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin: 4px 0;
}

.tool-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    border: 2px solid transparent;
    display: block;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.tool-card .icon { font-size: 36px; margin-bottom: 10px; }
.tool-card .name { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.tool-card .desc { font-size: 12px; color: var(--text-light); }

/* RESULT BOX (calculadoras, etc.) */
.result-box {
    background: var(--bg);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    margin: 16px 0;
}

.result-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -1px;
    word-break: break-all;
}

.result-value.green { color: var(--secondary); }
.result-value.red { color: #EF4444; }

/* CHECKBOX GROUP */
.check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0;
}

.check-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.check-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* IMC SCALE */
.imc-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-top: 16px;
    font-size: 12px;
}

.imc-scale-item {
    border-radius: 6px;
    padding: 8px 6px;
    text-align: center;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.imc-scale-item.active { opacity: 1; }
.imc-scale-item .imc-label { font-weight: 700; font-size: 11px; }
.imc-scale-item .imc-range { font-size: 10px; margin-top: 2px; }

/* =========================================================
   AUTOR
   ========================================================= */
.autor-section {
    display: flex;
    align-items: center;
    gap: 14px;
}
.autor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}
.autor-info strong {
    font-size: 14px;
    display: block;
    margin-bottom: 3px;
}
.autor-info span {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}
.autor-info a {
    color: var(--primary);
    text-decoration: none;
}
.autor-info a:hover { text-decoration: underline; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: #1E293B;
    color: #94A3B8;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}

footer a { color: #CBD5E1; text-decoration: none; }
footer a:hover { color: white; }

/* =========================================================
   CONTEÚDO SEO / FAQ
   ========================================================= */
.content-section h2, .faq-section h2 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.content-section p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 12px;
}

.content-section p:last-child { margin-bottom: 0; }

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

.faq-item:last-child { border-bottom: none; padding-bottom: 0; }

.faq-item h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.faq-item p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    /* Show hamburger, hide nav by default */
    .hamburger { display: block; }

    #nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #1E40AF;
        padding: 8px 12px 16px;
        z-index: 400;
        gap: 2px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    #nav.open { display: flex; }

    .nav-group-btn {
        width: 100%;
        justify-content: space-between;
        padding: 10px 12px;
    }

    .nav-dropdown {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.1);
        border-radius: 8px;
        margin-top: 4px;
        margin-left: 12px;
        display: none;
        padding: 4px 0;
    }

    .nav-group.open .nav-dropdown { display: block; }

    .nav-dropdown a {
        color: rgba(255,255,255,0.88);
        padding: 9px 14px;
        font-size: 13px;
    }

    .nav-dropdown a:hover {
        background: rgba(255,255,255,0.12);
        color: white;
    }
}

@media (max-width: 620px) {
    .big-value { font-size: 34px; }
    .price-grid { grid-template-columns: 1fr; }
    .tools-grid { grid-template-columns: 1fr 1fr; }
    .page-title h1 { font-size: 22px; }
    .result-value { font-size: 28px; }
    .imc-scale { grid-template-columns: 1fr 1fr; gap: 6px; }
}

@media (max-width: 360px) {
    .tools-grid { grid-template-columns: 1fr; }
}
