/* ============================================================
    DNS TOOL MASTER CSS (dns-tool.css)
   ============================================================ */

/* --- 1. CORE LAYOUT & BODY --- */
* { box-sizing: border-box; }
body { background-color: #2a2a2a; margin: 0; overflow-x: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.dns-page-wrapper { background-color: #1e1e1e; color: #e0e0e0; padding-bottom: 40px; }
header.dns-header { background: #2d2d2d; padding: 20px; font-size: 24px; font-weight: bold; border-bottom: 2px solid #444; color: #fff; text-align: center; }
.dns-container { display: flex; flex-direction: row; gap: 30px; padding: 30px; max-width: 1400px; margin: 0 auto; min-height: 600px; }

/* --- 2. SIDEBAR (STRICT BRANDING) --- */
.tool-sidebar-column { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.tool-sidebar { display: flex; flex-direction: column; gap: 8px; }
.tool-sidebar a, .tool-sidebar button {
    background: #1a1a1a;
    color: #ccc !important;
    border: 1px solid #333;
    padding: 12px 15px;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center; gap: 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    width: 100%;
    text-decoration: none;
}
.tool-sidebar a i, .tool-sidebar button i { width: 20px !important; font-size: 1.1rem; color: #25D366 !important; text-align: center; }
.tool-sidebar a:hover, .tool-sidebar button:hover { background: #252525; border-color: #444; color: #fff !important; }

.tool-sidebar a.active, .tool-sidebar button.active {
    background: #25D366 !important;
    color: #000 !important;
    border-color: #25D366 !important;
    font-weight: bold !important;
}
.tool-sidebar a.active i, .tool-sidebar button.active i { color: #000 !important; }

/* --- 3. COMPONENTS --- */
.sidebar-column-dns { min-width: 260px; }
.download-btn { display: block; text-align: center; text-decoration: none; background: transparent; color: #fff; padding: 12px; border: none; margin-bottom: 10px; font-weight: bold; }
.security-verification { background: #1a1a1a; padding: 15px; border-radius: 8px; border: 1px solid #333; }
.status-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.verification-main-text { font-size: 0.8rem; line-height: 1.3; color: #ccc; }
.verification-list { font-size: 0.75rem; color: #888; list-style: none; padding: 0; }
.instruction-note { font-size: 0.7rem; color: #666; border-top: 1px solid #333; padding-top: 5px; margin-top: 5px; }

.main-content-dns { flex: 1; min-width: 0; }
.view-switcher { margin-bottom: 25px; display: flex; gap: 10px; }
.view-switcher .scan { margin: 0; flex: 1; }
.dns-view-header { margin-top: 0; }
.dns-input-row { display: flex; gap: 10px; margin-bottom: 15px; }
.dns-input-row .dns-input { flex: 3; }
.dns-input-row .scan { flex: 1; margin: 0; }

.advanced-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.advanced-grid .scan { margin: 0; }

/* --- 4. BRANDED INPUTS & BUTTONS --- */
.dns-input { width: 100%; padding: 12px; border: 1px solid #555; background: #2a2a2a; color: #fff; border-radius: 4px; font-size: 16px !important; }
button.scan { padding: 12px 24px; background: #25D366 !important; border: 1px solid #25D366; color: #000 !important; border-radius: 4px; cursor: pointer; font-weight: bold; transition: all 0.2s ease; }
button.scan:hover { background: #20ba5a !important; }

/* --- 5. RESULTS WRAPPING (FIXES OVERFLOW) --- */
.result-box, #results, #advanced-output {
    background: #1a1a1a; 
    border-radius: 12px; 
    padding: 25px; 
    margin-bottom: 20px; 
    border: 1px solid #333;
    
    /* Strict Container Sizing */
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevents container itself from expanding */
    
    /* Strict Content Wrapping */
    white-space: pre-wrap !important; /* Maintains line breaks but wraps */
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important; /* Hard break for long strings */
    word-break: break-all !important;
}

/* Fix for any nested pre/code generated by scripts */
#results pre, #results code, #advanced-output pre {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    max-width: 100% !important;
    display: block !important;
}

@media (min-width: 901px) {
    .primary-dns-results { font-size: 1.1rem !important; line-height: 1.6 !important; }
}

/* --- 6. CTA SECTION --- */
.cta-section { background: #1a1a1a; padding: 60px 20px; text-align: center; border-top: 1px solid #333; margin-top: 40px; width: 100%; }
.book-now-btn { display: inline-block; background: #25D366; color: #000; padding: 15px 35px; border-radius: 50px; font-weight: bold; text-decoration: none; transition: 0.2s; }

/* --- 7. MOBILE FIXES --- */
@media (max-width: 900px) {
    .mobile-hide { display: none !important; }
    .dns-container { flex-direction: column !important; padding: 15px !important; }
    .tool-sidebar-column { width: 100% !important; order: 2; }
    .tool-sidebar { display: none !important; }
    .main-content-dns { width: 100% !important; order: 1; }
    .dns-input-row { flex-direction: column; }
    .book-now-btn { width: 100%; }
    
    /* Extra mobile safety for padding */
    .result-box, #results, #advanced-output { padding: 15px !important; }
}