:root{
  --accent:#0d6efd;
  --card-radius:12px;
  --muted:#6c757d;
}
body{background:linear-gradient(180deg,#f7fbff 0%,#ffffff 100%); min-height:100vh; font-family:Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;}
.header{background:rgba(255,255,255,0.6);backdrop-filter:blur(6px);box-shadow:0 2px 8px rgba(16,24,40,0.04);border-radius:10px;padding:12px 16px;}
.logo{width:44px;height:44px;border-radius:8px;background:linear-gradient(135deg,var(--accent),#6610f2);display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:18px;margin-right:12px;}
.ip-badge{font-weight:700;font-size:1.4rem;color:var(--accent);}
.card-modern{border:0;border-radius:var(--card-radius);box-shadow:0 8px 30px rgba(20,30,60,0.06);}
.tiny h1{font-size:0.85rem;color:var(--muted)}
.muted { color: var(--muted); }
.kv { font-weight:600; }
.value {word-break:break-word;}
.btn-ghost { background: transparent; border: 1px solid rgba(13,110,253,0.12); color:var(--accent); }
.nojs { display:none; }
@media (max-width:991px){ .desktop-only{display:none} }
.noticia-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background-color: #fff;
}
.noticia-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: #0d6efd;
}
.noticia-link { color: inherit; }
.noticia-link:hover .noticia-title {
  color: #6c757d !important;
  transition: color 0.25s ease;
}
.noticia-detalhe {
  margin: 0 auto;
}
.noticia-detalhe h2 {
  margin-bottom:30px;
}
.noticia-title {
  color: #212529;
  line-height: 1.3;
}
.noticia-texto p {
  margin-bottom: 1rem;
}
.noticia-texto img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}
.noticia-texto a {
  color: #0d6efd;
  text-decoration: underline;
}
.noticia-texto a:hover {
  color: #6c757d;
}
.card.card-modern {
  border-radius: 0.75rem;
  background-color: #fff;
}
.fs-6 {
    font-size: 1.1rem !important;
}
.noticia-texto table {
  margin-bottom:20px;
}
footer a {
  color:#222;
  text-decoration:none;
}
footer a:hover {
  color:#666;
  text-decoration:none;
}
footer p {
  color:#222;
}
body.dark-mode {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e9ecef;
}
body.dark-mode .card.shadow-sm.border-0 {
    background: #2d3748 !important;
    color: #e9ecef !important;
    border-color: #4a5568 !important;
}
body.dark-mode .card.shadow-sm.border-0 .text-primary {
    color: #63b3ed !important;
}
body.dark-mode .card.shadow-sm.border-0 .text-muted {
    color: #a0aec0 !important;
}
body.dark-mode .card.shadow-sm.border-0 .btn-outline-primary {
    border-color: #63b3ed;
    color: #63b3ed;
}
body.dark-mode .card.shadow-sm.border-0 .btn-outline-primary:hover {
    background-color: #63b3ed;
    color: #2d3748;
}
body.dark-mode footer {
    background: #1a202c;
    color: #a0aec0;
    border-top-color: #4a5568;
}
body.dark-mode footer a {
    color: #e9ecef;
}
body.dark-mode footer a:hover {
    color: #cbd5e0;
}
body.dark-mode footer p, body.dark-mode footer strong {
    color: #e9ecef;
}
body.dark-mode .header {
    background: rgba(45, 55, 72, 0.8);
    color: #e9ecef;
}
body.dark-mode .card-modern {
    background: #2d3748;
    color: #e9ecef;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
body.dark-mode .text-muted {
    color: #a0aec0 !important;
}
body.dark-mode .muted {
    color: #a0aec0;
}
body.dark-mode footer {
    color: #a0aec0;
    border-top-color: #4a5568;
}
body.dark-mode footer a {
    color: #e9ecef;
}
body.dark-mode footer a:hover {
    color: #cbd5e0;
}
body.dark-mode .noticia-card {
    background-color: #2d3748;
    border-color: #4a5568;
}
body.dark-mode .noticia-title {
    color: #e9ecef;
}
body.dark-mode .noticia-link:hover .noticia-title {
    color: #a0aec0 !important;
}
.speed-test-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.speed-result {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 1rem 0;
}
.speed-progress {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}
.speed-progress-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.3s ease;
}
.speed-status {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.9;
}
.theme-toggle {
    background: none;
    border: 1px solid rgba(13,110,253,0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    background: rgba(13,110,253,0.1);
}
body.dark-mode .theme-toggle {
    border-color: rgba(255,255,255,0.2);
    color: #e9ecef;
}
body.dark-mode .theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}
.speed-history-item .text-primary {
    font-size: 1.1em;
}
.speed-history-item .text-success {
    font-weight: 500;
}
body.dark-mode .speed-history-item .text-primary {
    color: #63b3ed !important;
}
body.dark-mode .speed-history-item .text-success {
    color: #68d391 !important;
}
.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #0d6efd;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}
.notification.success {
    border-left-color: #198754;
}
.notification.warning {
    border-left-color: #ffc107;
}
.notification.info {
    border-left-color: #0dcaf0;
}
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
body.dark-mode .notification {
    background: #2d3748;
    color: #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.qr-code-container {
    text-align: center;
}
.qr-code-canvas {
    max-width: 220px;
    margin: 0 auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.qr-download-btn {
    margin-top: 10px;
    margin-right: 5px;
}
.qr-share-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}
.qr-fade-in {
    animation: qrFadeIn 0.5s ease-in-out;
}
@keyframes qrFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
body.dark-mode .qr-code-canvas {
    background: #2d3748;
    border-color: #4a5568;
}
body.dark-mode .qr-share-section {
    border-top-color: #4a5568;
}
.qr-code-canvas img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 100%;
    height: auto;
}
.speed-test-enhanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.speed-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}
.speed-metric {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}
.speed-metric-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}
.speed-metric-label {
    font-size: 0.8rem;
    opacity: 0.9;
}
.speed-progress-enhanced {
    height: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    overflow: hidden;
    margin: 1rem 0;
}
.speed-progress-bar-enhanced {
    height: 100%;
    background: linear-gradient(90deg, #4cd964, #5ac8fa, #007aff);
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}
.speed-progress-bar-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.speed-phase {
    text-align: center;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    opacity: 0.8;
}
.upload-test {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}
.ping-test {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
}
.btn-close-custom {
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.btn-close-custom:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
}
.speed-test-enhanced .btn-close-custom {
    color: white;
}
.speed-test-enhanced .btn-close-custom:hover {
    background: rgba(255,255,255,0.2);
}
.card-modern .btn-close-custom {
    color: #6c757d;
}
.card-modern .btn-close-custom:hover {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}
body.dark-mode .card-modern .btn-close-custom {
    color: #a0aec0;
}
body.dark-mode .card-modern .btn-close-custom:hover {
    background: rgba(160, 174, 192, 0.1);
    color: #e9ecef;
}
.webrtc-results .alert {
    border-left: 4px solid #0dcaf0;
}
.webrtc-leak {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    color: white;
    border-left: 4px solid #dc3545 !important;
}
.webrtc-safe {
    background: linear-gradient(135deg, #51cf66, #2b8a3e) !important;
    color: white;
    border-left: 4px solid #198754 !important;
}
.webrtc-warning {
    background: linear-gradient(135deg, #ffd43b, #f59f00) !important;
    color: black;
    border-left: 4px solid #ffc107 !important;
}
#webrtc-ips {
    max-height: 150px;
    overflow-y: auto;
    font-family: monospace;
}
.webrtc-ip-item {
    padding: 2px 5px;
    margin: 2px 0;
    border-radius: 3px;
    background: rgba(0,0,0,0.05);
}
.ipv6-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
}
.ipv4-badge {
    background: linear-gradient(135deg, #4cd964, #5ac8fa);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-left: 8px;
}
.lookup-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
}
.lookup-info-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}
.lookup-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.lookup-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(13, 110, 253, 0.1);
}
.security-card .lookup-icon { background: rgba(40, 167, 69, 0.1); }
.location-card .lookup-icon { background: rgba(255, 193, 7, 0.1); }
.resolved-card .lookup-icon { background: rgba(111, 66, 193, 0.1); }
.lookup-content {
    flex: 1;
}
.lookup-label {
    color: #6c757d;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}
.lookup-value {
    font-weight: 700;
    color: #212529;
    margin-bottom: 2px;
}
.ip-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}
.lookup-desc {
    color: #6c757d;
    font-size: 0.8em;
}
.lookup-details .accordion-button {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px !important;
    font-weight: 600;
    padding: 0.75rem 1rem;
}
.lookup-details .accordion-button:not(.collapsed) {
    background: #e7f1ff;
    color: #0d6efd;
    border-color: #0d6efd;
}
.lookup-details .accordion-body {
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e9ecef;
    border-top: none;
}
.dns-record {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    margin: 2px 0;
    border-left: 3px solid #28a745;
}
.security-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
}
.security-safe {
    background: #d4edda;
    color: #155724;
}
.security-warning {
    background: #fff3cd;
    color: #856404;
}
.security-danger {
    background: #f8d7da;
    color: #721c24;
}
body.dark-mode .lookup-info-card {
    background: #2d3748;
    border-color: #4a5568;
    color: #e9ecef;
}
body.dark-mode .lookup-value {
    color: #e9ecef;
}
body.dark-mode .lookup-details .accordion-button {
    background: #2d3748;
    border-color: #4a5568;
    color: #e9ecef;
}
body.dark-mode .lookup-details .accordion-body {
    background: #2d3748;
    border-color: #4a5568;
    color: #e9ecef;
}
body.dark-mode .dns-record {
    background: #4a5568;
    color: #e9ecef;
}
.text-fff {
    color:#fff !important;
}
.tab-content {
    background-color:#ffffff;
}
.menu-toggle {
    display: none;
    margin-left: auto;
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    color: var(--accent);
    transition: color 0.2s;
}
.menu-toggle:hover {
    color: #0b5ed7;
}
body.dark-mode .menu-toggle {
    color: #e9ecef;
}
body.dark-mode .menu-toggle:hover {
    color: #cbd5e0;
}
.menu-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
@media (max-width: 1199.98px) {
    .menu-toggle {
        display: flex !important;
    }
    .menu-options {
        display: none !important;
        position: absolute;
        top: 100%;
        right: 0;               /* mantém alinhado à direita */
        left: auto;             /* garante que não herde left */
        max-width: calc(100vw - 20px); /* evita que ultrapasse a tela */
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-radius: 8px;
        padding: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        min-width: 200px;
        z-index: 1000;
        border: 1px solid rgba(0,0,0,0.1);
    }
    .menu-options.show {
        display: flex !important;
    }
    .menu-options .btn,
    .menu-options a {
        margin: 0.25rem 0 !important;
        width: 100%;
        text-align: center;
    }
    .menu-options .btn:last-child,
    .menu-options a:last-child {
        margin-bottom: 0 !important;
    }
    .menu-options .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}
body.dark-mode .menu-options {
    background: #2d3748;
    border-color: #4a5568;
}
body.dark-mode .menu-options .btn,
body.dark-mode .menu-options a {
    color: #e9ecef;
}
body.dark-mode .menu-options .btn:hover,
body.dark-mode .menu-options a:hover {
    background: rgba(255,255,255,0.1);
}
#btn-copy-ip {
    padding: 0.1rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1.2;
}