/* ============================================================
    PORTS TOOL MASTER CSS (ports-tool.css)
   ============================================================ */

/* --- 1. CORE LAYOUT --- */
* { 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; width: 100%; overflow-x: hidden; }
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 --- */
.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 button, .tool-sidebar a { background: #1a1a1a; color: #ccc; 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 button i, .tool-sidebar a i { width: 20px !important; font-size: 1.1rem; color: #25D366; text-align: center; }
.tool-sidebar button:hover, .tool-sidebar a:hover { background: #252525; border-color: #444; color: #fff; }
.tool-sidebar button.active, .tool-sidebar a.active { background: #25D366 !important; color: #000 !important; border-color: #25D366; font-weight: bold; }

/* --- 3. MAIN CONTENT & INPUTS --- */
.ports-main-content { flex: 1; min-width: 0; }
.ports-input-container { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }
.ports-target-row { display: flex; gap: 10px; }
.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; display: inline-block; transition: all 0.2s ease; }

.ports-preset-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 5px; }
.preset-btn { background: #1a1a1a; color: #25D366; border: 1px solid #333; padding: 10px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; font-weight: bold; transition: all 0.2s ease; }
.preset-btn:hover { background: #25D366; color: #000; border-color: #25D366; }

/* --- 4. RESULTS SECTION --- */
.ports-output { background: #1a1a1a; border-radius: 12px; padding: 25px; margin-bottom: 20px; border: 1px solid #333; width: 100%; }

.mobile-scroll-tip {
    display: none; 
    background: rgba(37, 211, 102, 0.1); color: #25D366; padding: 12px;
    border-radius: 6px; font-size: 0.85rem; margin-bottom: 15px;
    border: 1px solid rgba(37, 211, 102, 0.2); align-items: center; gap: 8px;
}

.table-responsive-wrapper { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 5px; }
.ports-output table { width: 100%; border-collapse: collapse; }
.ports-output th { background: #333; padding: 12px; text-align: left; color: #fff; border-bottom: 2px solid #444; }
.ports-output td { padding: 12px; border-bottom: 1px solid #333; }

/* --- 5. CTA SECTION (RESTORED) --- */
.cta-section { background: #1a1a1a; padding: 60px 20px; text-align: center; border-top: 1px solid #333; margin-top: 40px; width: 100%; }
.cta-section h3 { font-size: 2rem; color: #fff; margin-bottom: 15px; }
.book-now-btn { display: inline-block; background: #25D366; color: #000; padding: 15px 35px; border-radius: 50px; font-weight: bold; text-decoration: none; font-size: 1.1rem; transition: all 0.2s ease; }
.book-now-btn:hover { background: #20ba5a; transform: translateY(-2px); }

/* --- 6. MOBILE RESPONSIVE TWEAKS --- */
@media (max-width: 900px) {
    .dns-container { flex-direction: column !important; padding: 15px !important; width: 100% !important; }
    .tool-sidebar { display: none !important; }
    .ports-main-content { width: 100% !important; order: 1; }
    .ports-target-row { flex-direction: column; gap: 10px; }
    .ports-preset-grid { grid-template-columns: 1fr 1fr; } 

    .mobile-scroll-tip { display: flex; }
    .ports-output { padding: 15px !important; }

    /* Anti-Squash Table Logic */
    .ports-output table { min-width: 480px !important; }
    .ports-output th, .ports-output td { white-space: nowrap !important; padding: 12px 8px !important; font-size: 0.85rem; }

    /* CTA Mobile Fix */
    .cta-section h3 { font-size: 1.5rem !important; }
    .book-now-btn { width: 100%; text-align: center; }
}