/* Skip link (acessibilidade) */
        .skip-link { position: absolute; top: -40px; left: 0; background: #0A4D68; color: #fff; padding: 8px 16px; z-index: 9999; font-size: 14px; border-radius: 0 0 4px 0; transition: top .2s; text-decoration: none; }
        .skip-link:focus { top: 0; }
    :root {
      --primary: #0A4D68;
      --primary-dark: #06384d;
      --primary-light: #0e6b91;
      --accent: #047857;
      --accent-light: #059669;
      --secondary: #D97706;
      --bg-body: #F8FAFB;
      --bg-card: #FFFFFF;
      --bg-section: #F1F5F9;
      --text-main: #1C1917;
      --text-muted: #57534E;
      --text-light: #78716C;
      --border-subtle: #E2E8F0;
      --container-width: 1200px;
      --header-height: 90px;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
      --shadow-lg: 0 16px 48px rgba(0,0,0,0.10);
      --radius-sm: 8px;
      --radius-md: 14px;
      --radius-lg: 20px;
    }

    [data-theme="dark"] {
      --bg-body: #0C0A09;
      --bg-card: #1C1917;
      --bg-section: #151312;
      --text-main: #F5F5F4;
      --text-muted: #A8A29E;
      --text-light: #78716C;
      --primary: #38BDF8;
      --primary-light: #7DD3FC;
      --accent: #34D399;
      --accent-light: #6EE7B7;
      --border-subtle: #292524;
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
      --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
      --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
      background-color: var(--bg-body);
      color: var(--text-main);
      line-height: 1.75;
      transition: background-color 0.4s ease, color 0.4s ease;
    }

    a { text-decoration: none; color: inherit; transition: 0.2s ease; }
    .container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

    /* --- TOPO E NAVEGAÇÃO --- */
    .top-bar { background-color: #0A4D68; color: #fff; padding: 8px 0; font-size: 0.85rem; }
    .top-bar .container {
      display: flex;
      justify-content: flex-end;
      gap: 20px;
      align-items: center;
      flex-wrap: wrap;
    }

    .theme-toggle, .lang-selector select {
      background: none;
      border: none;
      color: #fff;
      padding: 0;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: inherit;
      font-size: 0.85rem;
    }

    .lang-selector select {
      padding-right: 18px;
      appearance: none;
      -webkit-appearance: none;
    }

    .lang-selector {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .lang-selector select option { background-color: #0A4D68; color: #fff; }

    .main-header {
      background-color: var(--bg-card);
      border-bottom: 1px solid var(--border-subtle);
      position: sticky;
      top: 0;
      z-index: 1000;
      height: var(--header-height);
      box-shadow: var(--shadow-sm);
    }

    .main-header .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
      height: 100%;
      gap: 16px;
    }

    .logo {
      font-family: 'Playfair Display', serif;
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--primary);
      display: flex;
      align-items: center;
      gap: 12px;
      white-space: nowrap;
    }

    .nav-menu {
      display: flex;
      gap: 28px;
      list-style: none;
      align-items: center;
    }

    .nav-link {
      font-weight: 700;
      color: var(--text-muted);
      text-transform: uppercase;
      font-size: 0.92rem;
    }

    .nav-link:hover, .nav-link.active { color: var(--primary); }

    .btn-outline {
      border: 2px solid var(--primary);
      color: var(--primary);
      padding: 8px 20px;
      border-radius: 999px;
      text-transform: uppercase;
      font-weight: 800;
      font-size: 0.85rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

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

    /* Dropdown CSS */
    .nav-dropdown { position: relative; }

    .nav-dropdown-toggle {
      background: none;
      border: none;
      font-family: 'Source Sans 3', sans-serif;
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text-muted);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 0;
      text-transform: uppercase;
    }

    .nav-dropdown-toggle:hover { color: var(--primary); }
    .dropdown-chevron { transition: transform 0.2s ease; }
    .nav-dropdown.open .dropdown-chevron { transform: rotate(180deg); }

    .nav-dropdown-menu {
      position: absolute;
      top: 100%;
      right: 0;
      min-width: 260px;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      box-shadow: var(--shadow-md);
      padding: 10px 0;
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: all 0.2s ease;
      z-index: 9000;
      margin-top: 10px;
    }

    .nav-dropdown.open .nav-dropdown-menu {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown-section-title {
      display: block;
      padding: 10px 20px 5px;
      font-size: 0.75rem;
      font-weight: 800;
      text-transform: uppercase;
      color: var(--text-light);
    }

    .dropdown-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
      font-size: 0.9rem;
      color: var(--text-main);
      font-weight: 500;
    }

    .dropdown-item:hover {
      background: rgba(10, 77, 104, 0.05);
      color: var(--primary);
    }

    /* Breadcrumb */
    .breadcrumb-bar {
      background: var(--bg-section);
      border-bottom: 1px solid var(--border-subtle);
      padding: 12px 0;
    }

    .breadcrumb-list {
      list-style: none;
      display: flex;
      gap: 8px;
      font-size: 0.85rem;
      color: var(--text-light);
      flex-wrap: wrap;
    }

    .breadcrumb-list a { color: var(--primary); font-weight: 600; }
    .breadcrumb-sep { opacity: 0.5; }

    /* --- PAGE HEADER --- */
    .page-header {
      padding: 48px 0 24px;
      text-align: center;
      background: linear-gradient(180deg, var(--bg-section) 0%, var(--bg-body) 100%);
    }

    .page-header h1 {
      font-family: 'Playfair Display', serif;
      font-weight: 800;
      font-size: clamp(2rem, 4vw, 3rem);
      color: var(--primary);
      margin-bottom: 16px;
    }

    .page-header .subtitle {
      font-size: 1.15rem;
      color: var(--text-muted);
      max-width: 750px;
      margin: 0 auto;
    }

    .trust-row {
      display: flex;
      justify-content: center;
      gap: 10px;
      flex-wrap: wrap;
      margin-top: 24px;
    }

    .trust-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 14px;
      border: 1px solid var(--border-subtle);
      border-radius: 999px;
      background: var(--bg-card);
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text-muted);
    }

    /* --- SEÇÃO DA FERRAMENTA --- */
    .tool-section { padding: 22px 0 0; }

    /* --- IP TOOL UI --- */
    .ip-tool-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      max-width: 900px;
      margin: 0 auto;
      text-align: center;
      position: relative;
    }

    .ip-main-display {
      padding: 40px 20px;
      background: linear-gradient(135deg, rgba(10,77,104,0.05), rgba(4,120,87,0.05));
      border-bottom: 1px solid var(--border-subtle);
    }

    /* --- IP dual (IPv4 + IPv6) --- */
    .ip-dual-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
      align-items: start;
      margin-bottom: 14px;
    }

    .ip-block {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 18px 14px;
      box-shadow: var(--shadow-sm);
    }

    .ip-label {
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-weight: 800;
      color: var(--text-light);
      margin-bottom: 10px;
      display: block;
    }

    .ip-address-value {
      font-family: 'Fira Code', monospace;
      font-size: clamp(1.1rem, 2.3vw, 2.2rem);
      font-weight: 700;
      color: var(--primary);
      line-height: 1.25;
      letter-spacing: 0.01em;
      margin: 10px auto 18px;
      padding: 0 12px;
      max-width: 100%;
      white-space: normal;
      word-break: normal;
      overflow-wrap: anywhere;
      text-wrap: pretty;
    }

    .copy-row {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .copy-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-card);
      border: 2px solid var(--border-subtle);
      padding: 10px 20px;
      border-radius: 999px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
      color: var(--text-muted);
    }

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

    .copy-btn:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }

    .copy-msg {
      display: none;
      color: var(--accent);
      font-size: 0.85rem;
      font-weight: 800;
    }

    /* Avisos (quando serviços bloqueiam / adblock / origem file://) */
    .notice {
      margin: 14px auto 0;
      max-width: 720px;
      text-align: left;
      border: 1px solid var(--border-subtle);
      background: var(--bg-card);
      border-radius: 14px;
      box-shadow: var(--shadow-sm);
      overflow: hidden;
    }

    .notice-inner {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 10px;
      align-items: start;
      padding: 12px 12px;
    }

    .notice-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
    .notice-text div { font-size: 0.95rem; color: var(--text-muted); }

    .notice[data-variant="error"] { border-color: rgba(217,119,6,0.45); }
    .notice[data-variant="warn"] { border-color: rgba(4,120,87,0.35); }
    .notice[data-variant="info"] { border-color: rgba(56,189,248,0.35); }

    .notice-actions {
      display: flex;
      gap: 10px;
      align-items: center;
      padding: 0 12px 12px;
      flex-wrap: wrap;
    }

    .notice-btn {
      border: 2px solid var(--border-subtle);
      background: var(--bg-card);
      color: var(--text-main);
      padding: 9px 14px;
      border-radius: 999px;
      font-weight: 800;
      cursor: pointer;
      transition: all 0.2s;
    }

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

    .notice-close {
      border: none;
      background: transparent;
      cursor: pointer;
      color: var(--text-muted);
      padding: 6px;
      border-radius: 10px;
    }

    .notice-close:hover { background: rgba(0,0,0,0.05); }
    [data-theme="dark"] .notice-close:hover { background: rgba(255,255,255,0.06); }

    .ip-details-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1px;
      background: var(--border-subtle);
    }

    .ip-detail-item {
      background: var(--bg-card);
      padding: 24px;
      text-align: left;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .detail-label {
      font-size: 0.8rem;
      text-transform: uppercase;
      font-weight: 700;
      color: var(--text-light);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .detail-value {
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text-main);
      word-break: break-word;
    }

    .loading-pulse { animation: pulse 1.5s infinite; opacity: 0.6; }

    @keyframes pulse {
      0% { opacity: 0.6; }
      50% { opacity: 0.3; }
      100% { opacity: 0.6; }
    }

    @media (prefers-reduced-motion: reduce) {
      .loading-pulse { animation: none; }
      * { scroll-behavior: auto; }
    }

    @media (max-width: 800px) {
      .ip-dual-grid { grid-template-columns: 1fr; }
    }

    /* --- CONTEÚDO EDUCATIVO --- */
    .content-area { max-width: 800px; margin: 50px auto; padding: 0 20px; }

    .content-block h2 {
      font-family: 'Playfair Display', serif;
      font-size: 1.8rem;
      margin-bottom: 16px;
      color: var(--text-main);
      border-bottom: 2px solid var(--secondary);
      display: inline-block;
      padding-bottom: 4px;
    }

    .content-block p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 20px; }
    .content-block ul { margin-left: 20px; margin-bottom: 20px; color: var(--text-muted); }
    .content-block li { margin-bottom: 8px; }

    .info-box {
      background: var(--bg-section);
      border-left: 4px solid var(--accent);
      padding: 20px;
      border-radius: 0 8px 8px 0;
      margin: 30px 0;
    }

    /* --- FOOTER --- */
    footer { background: #1C1917; color: #A8A29E; padding: 60px 0 20px; margin-top: 60px; font-size: 0.95rem; }

    .footer-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 40px;
      margin-bottom: 40px;
    }

    .footer h4 { color: #fff; font-family: 'Playfair Display', serif; margin-bottom: 20px; }
    .footer ul { list-style: none; }
    .footer ul li { margin-bottom: 10px; }
    .footer ul li a:hover { color: #fff; }

    .footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; font-size: 0.85rem; }

    @media (max-width: 920px) {
      .container { padding: 0 18px; }
      .logo { font-size: 1.45rem; }
    }

    @media (max-width: 800px) {
      .nav-menu { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
      .page-header h1 { font-size: 2rem; }
      .ip-main-display { padding: 28px 14px; }
      .ip-address-value { padding: 0 8px; }
    }
