/* === RESET E CONFIGURAÇÕES BÁSICAS === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: rgb(33, 55, 69); 
    --card-bg: #15242e; 
    --item-bg: #1c2e3a;
    --border: #2a4354;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: #0d161c;
    
    --primary: #00F55E; 
    --primary-dark: #00d652; 
    --primary-text: rgb(33, 55, 69); 
    --error: #ef4444;
    --success: #00F55E;

    --skeleton-bg: #1c2e3a;
    --skeleton-line: #2a4354;
    --skeleton-shine: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
    --bg-color: #f0f4f8; 
    --card-bg: #ffffff;
    --item-bg: #f8fafc;
    --border: #cbd5e1; 
    --input-bg: #ffffff;

    --text-main: #1a2b3c; 
    --text-muted: #64748b;
    
    --primary: #00C853;
    --primary-dark: #00A040; 
    --primary-text: #ffffff;
    --success: #00C853;    
    --error: #ef4444;
    
    --skeleton-bg: #e2e8f0;
    --skeleton-line: #cbd5e1;
    --skeleton-shine: rgba(255, 255, 255, 0.6);
}

/* === LAYOUT BASE === */
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--bg-color) !important;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Aplica o Pattern (pontinhos) Apenas no modo Light */
[data-theme="light"] body {
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
}


/* === CONTAINER PRINCIPAL === */
.container {
    position: relative;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); /* Aumentada a sombra base para dar destaque no branco */
    width: 100%;
    max-width: 700px;
    border: 1px solid var(--border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* === TÍTULOS === */
h2 {
    text-align: center;
    color: var(--text-main);
    font-size: 2rem;
    margin: 2rem 0 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    position: relative;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 4px;
    background-color: var(--primary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
    opacity: 0.9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h3 {
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: var(--text-main) !important;
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    font-weight: 600;
    line-height: 1.4;
}

/* === INPUT GROUP === */
.input-group {
    margin-bottom: 24px;
    position: relative;
}
.input-with-reset {
    position: relative;
    display: flex;
    align-items: center;
}

.clear-site-url-btn {
    position: absolute;
    right: 12px;
    top: 15%;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    padding: 0;
    line-height: 1;
}

.clear-site-url-btn:hover {
    color: var(--error);
}

#site-url {
    width: 100%;
    padding: 12px 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    background-color: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#site-url:focus {
    border-color: var(--primary);
    outline: none;
}

#site-url.is-invalid {
    border-color: var(--error);
}

.url-feedback {
    color: var(--primary);
    font-size: 14px;
    margin-top: 6px;
}

/* === CHECKLIST === */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0.5rem;
    background-color: var(--item-bg);
    border: 1px solid var(--border); 
    transition: background-color 0.3s, box-shadow 0.3s;
    max-width: 100vw;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Sombra mais sutil */
}

label {
    padding: 10px;
    width: fit-content;
    max-width: 160px;
    color: var(--text-main);
}

/* Subtítulo na checklist */
.subtitle {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

/* Cores de status no item */
.checklist-item[data-status="ok"] {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
}

.checklist-item[data-status="not-ok"] {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

:root:not([data-theme="light"]) .checklist-item[data-status="ok"] {
    background-color: rgba(0, 245, 94, 0.1);
}

/* === BOTÕES === */
button {
    margin: 12px 6px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    border: none;
    font-weight: 600;
}

.btn, 
#add-link-btn,
#check-btn,
#reset-btn,
#copy-button {
    margin: 12px 6px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background-color: var(--primary);
    color: var(--primary-text);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn:hover,
#add-link-btn:hover,
#check-btn:hover,
#reset-btn:hover,
#copy-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

#add-link-btn {
    padding: 12px 36px;
    font-size: 18px;
}

/* === BOTÕES DE STATUS === */
.status-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.status-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted); 
    transition: transform 0.2s, opacity 0.2s, background-color 0.2s;
}

.status-btn.not-ok:hover {
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.15);
}

.status-btn.not-ok.selected {
    color: var(--error);
    background-color: rgba(239, 68, 68, 0.25);
}

.status-btn.ok:hover {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.15);
}

.status-btn.ok.selected {
    color: var(--success);
    background-color: rgba(16, 185, 129, 0.25);
}

:root:not([data-theme="light"]) .status-btn.ok:hover {
    background-color: rgba(0, 245, 94, 0.15);
}

:root:not([data-theme="light"]) .status-btn.ok.selected {
    background-color: rgba(0, 245, 94, 0.25);
}

.status-btn:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.status-btn.selected {
    border-radius: 4px;
}

.nav-btn {
    margin: 12px 6px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    background-color: var(--primary);
    color: var(--primary-text);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn:disabled {
    background-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: .45;
}

/* === CHECKLIST CAROUSEL (migrado de inline JS — transform/altura seguem dinâmicos) === */
.checklist-slider-wrapper {
    overflow: hidden;
    width: 100%;
    min-height: 0;
    transition: height 300ms cubic-bezier(.2, .8, .2, 1);
}

.checklist-slider {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: flex-start;
    will-change: transform;
    transition: transform 300ms cubic-bezier(.2, .8, .2, 1);
}

.checklist-section {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 12px;
}

.checklist-section h3 {
    color: var(--text, #333);
    margin-bottom: 8px;
}

.checklist-bottomnav {
    width: 100%;
    box-sizing: border-box;
    padding-top: 10px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-dots-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.carousel-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.pager-text {
    font-size: 13px;
    color: var(--text-primary);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(185, 181, 181, 1);
}

.carousel-dot.active {
    background: var(--primary, #0077cc);
    transform: scale(1.2);
}

/* === RESULTADOS === */
.result {
    margin-top: 24px;
    padding: 12px;
    font-weight: bold;
    border-radius: 6px;
    border-top: 1px solid var(--border);
}

.approved-title {
    color: var(--success);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
}

.not-approved-title {
    color: var(--error);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.result-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.result-list li {
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: var(--item-bg);
    color: var(--text-main);
    border: 1px solid var(--border);
    font-size: 17px;
    line-height: 1.5;
}

.approved-title+.result-list li {
    border-left: 4px solid var(--success);
}

.not-approved-title+.result-list li {
    border-left: 4px solid var(--error);
}

/* === ANIMAÇÕES === */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ellipsis {
    0% { content: ''; }
    33% { content: '.'; }
    66% { content: '..'; }
    100% { content: '...'; }
}

/* === SKELETON LOADER === */
.skeleton-loader {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    background-color: var(--skeleton-bg);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skeleton-loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    height: 100%;
    width: 150%;
    background: linear-gradient(to right,
            transparent 0%,
            var(--skeleton-shine) 50%,
            transparent 100%);
    animation: shine 1.2s ease-in-out infinite;
}

@keyframes shine {
    from { left: -150%; }
    to { left: 150%; }
}

.skeleton-line {
    height: 14px;
    background: var(--skeleton-line);
    border-radius: 4px;
}

.skeleton-line.short { width: 25%; }
.skeleton-line.medium { width: 50%; }
.skeleton-line.long { width: 100%; }

/* === ESTADOS === */
.verificando {
    animation: ellipsis steps(4, end) 1s infinite;
    pointer-events: none;
}

#add-link-btn.verificando::after {
    content: '';
    display: inline-block;
    margin-left: 4px;
    width: 1ch;
    text-align: left;
    animation: ellipsis steps(4, end) 1s infinite;
}

/* === RESPONSIVO === */
@media (max-width: 480px) {
    .checklist-item {
        flex-direction: column;
        align-items: stretch;      
        gap: 8px;
        padding: 10px;             
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: auto;
    }

    .checklist-item > label {
        font-weight: 700;
        font-size: 15px;
        padding: 6px 8px;
        margin-bottom: 4px;
        color: var(--text-main);
        width: 100% !important;       
        max-width: 100% !important;    
        flex: 1 1 100% !important;     
        white-space: normal !important;
        overflow: visible !important; 
        text-overflow: unset !important;
    }

    .checklist-item .subtitle {
        font-size: 13px;
        color: var(--text-muted);
        line-height: 1.3;
        margin: 0 4px 6px 4px;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        max-height: 3.9em;       
    }

    .checklist-item .status-buttons {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin-top: 6px;
        align-self: center;
    }

    .checklist-item .status-btn {
        min-width: 44px;
        height: 44px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .checklist-item > label,
    .checklist-item .subtitle {
        min-width: 0;
    }

    .checklist-item {
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    }

    .nav-btn {
        width: 100%; 
        padding: 10px 12px; 
        font-size: 14px; 
        margin: 12px 0;
        border-radius: 6px; 
    }
}

/* === UTILITÁRIOS === */
.hidden {
    display: none !important;
}

.imagem-wrapper {
    margin-bottom: 12rem;
}

.imagem-join {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 11px;
}

/* === Céu estrelado === */
#sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

[data-theme="light"] #sky {
    display: none;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 100%;
    animation: twinkle 1s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Área de Notas */
.notes-container {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border); 
}

.notes-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-title::before {
    content: '✎'; 
    font-size: 18px;
    color: var(--text-muted);
}

#checklist-notes {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--input-bg); 
    color: var(--text-main);
    font-family: inherit;
    font-size: 15px;
    resize: vertical; 
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    outline: none;
}

#checklist-notes:focus {
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); 
}

#checklist-notes::placeholder {
    color: var(--text-muted);
}

.theme-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}


.toast-notification {
  position: fixed;
  top: 32px;        
  right: 150px;
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 18px 26px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 16px;          
  font-size: 16px;
  font-weight: 500;
  z-index: 9999;
  
  overflow: hidden; 
  
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast-notification::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;       
  height: 100%;
}

.toast-notification.toast-show {
  opacity: 1;
  transform: translateY(0);
  animation: toastPulse 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes toastPulse {
  0% { transform: scale(0.95) translateY(-20px); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1) translateY(0); }
}

.toast-icon svg {
  width: 24px;  
  height: 24px;
}

.toast-success .toast-icon {
  color: var(--primary);
  display: flex;
}
.toast-success::before {
  background-color: var(--primary);
}

.toast-error .toast-icon {
  color: var(--error);
  display: flex;
}
.toast-error::before {
  background-color: var(--error);
}

[data-theme="dark"] .toast-notification {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}

@media (max-width: 600px) {
  .toast-notification {
    top: 650px;
    right: 16px;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
  }
  .toast-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ==========================================================================
   DASHBOARD DE RESULTADOS (O Tapinha Premium)
   ========================================================================== */
.results-grid {
    display: grid;
    /* Cria colunas responsivas: se tiver espaço, ficam lado a lado, senão empilham */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
    width: 100%;
}

/* O Cartão Minimalista */
.dashboard-card {
    background-color: var(--item-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.dashboard-card:empty {
    display: none; /* Se o JS limpar o cartão, ele some da tela */
}

/* Cabeçalho do Cartão (Ícone + Título) */
.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Conteúdo Principal do Cartão */
.card-content {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}

.card-actions {
    margin-top: auto; /* Empurra os botões sempre pro rodapé do cartão */
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Botões Modernos (Estilo Fantasma/Outline) dentro dos Cards */
.btn-outline {
    flex: 1;
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-outline:hover {
    background-color: rgba(0, 245, 94, 0.1);
    color: var(--success);
    border-color: var(--success);
}
[data-theme="light"] .btn-outline:hover {
    background-color: rgba(0, 200, 83, 0.1);
}

/* Badge do Status Principal (Online/Offline) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    border: 1px solid transparent;
    animation: slideDown 0.3s ease forwards;
}

.status-badge.online {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.offline {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Esconde os textos antigos feios que ficavam soltos na tela */
#sitemap-feedback, #adstxt-feedback-container {
    display: none !important;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}