/* General Utility Styles */
.error {
    color: #ff6b6b; /* Brighter red for errors */
    background-color: rgba(255, 107, 107, 0.1);
    padding: 10px 15px;
    border-radius: 4px;
    border-left: 3px solid #ff6b6b;
    margin: 15px 0;
    display: none; /* Initially hidden */
    font-size: 14px;
}

.service-error {
    color: #ffb700; /* Brighter orange */
    font-style: italic;
    font-size: 13px;
    text-align: center;
    padding: 15px;
    background-color: rgba(255, 183, 0, 0.08);
    border-radius: 4px;
    border-left: 3px solid #ffb700;
    margin: 15px 0;
}

.loading {
    margin: 15px 0;
    color: #aaa; /* Lighter gray */
    font-style: italic;
    text-align: center;
}

.panel-loading {
    margin: 10px 0;
    color: #999; /* Slightly darker gray */
    font-style: italic;
    text-align: center;
    padding: 30px 20px; /* More padding */
    font-size: 14px;
}

.bookmarklet {
    margin: 25px 0;
    padding: 15px;
    color: #999;
    font-size: 13px;
    text-align: center;
    background-color: #2a2a2a; /* Darker background */
    border-radius: 6px;
    border: 1px solid #333;
}

.bookmarklet-button {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 5px;
    background: #444; /* Slightly lighter background */
    color: #eee; /* Lighter text */
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #555;
    cursor: move;
    user-select: none;
    font-size: 13px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.bookmarklet-button:hover {
    background: #555;
    border-color: #666;
}

/* Result Container Styles */
.result-container {
    background-color: #252525; /* Slightly different background */
    border-radius: 8px;
    padding: 20px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Softer shadow */
    border: 1px solid #383838; /* Subtle border */
}

.domain-header {
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.domain-header h3 {
    margin-top: 0;
    margin-bottom: 8px; /* Reduced margin */
    color: #eee;
    font-size: 1.3em; /* Slightly larger */
    font-weight: 500;
}

.domain-ips {
    color: #ccc;
    font-size: 14px;
}

.domain-subtitle {
    color: #aaa;
    font-size: 0.85em; /* Smaller subtitle */
    margin-top: 10px;
    line-height: 1.5;
    font-family: monospace; /* Monospace for dates/registrar */
}

.domain-warning {
    color: #ffb700;
    font-weight: bold;
    background-color: rgba(255, 183, 0, 0.1);
    border-radius: 4px;
    padding: 6px 12px;
    margin-top: 10px;
    display: inline-block;
    font-size: 0.8em;
    border: 1px solid rgba(255, 183, 0, 0.2);
}

/* Tabs Container Styles */
.tabs-container {
    display: flex;
    flex-direction: row;
    margin-top: 20px;
    min-height: 350px; /* Increased min height */
}

/* Tab List (Vertical Buttons) */
.tab-list {
    display: flex;
    flex-direction: column;
    width: 160px; /* Slightly wider */
    flex-shrink: 0;
    border-right: 1px solid #444;
    margin-right: 20px; /* Increased margin */
}

.tab-button {
    background: transparent;
    border: none;
    padding: 14px 12px; /* Increased padding */
    text-align: left;
    color: #bbb;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #333;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth transitions */
    border-left: 3px solid transparent; /* Placeholder for active state */
    margin-left: -3px; /* Compensate for border */
}

.tab-button:last-child {
    border-bottom: none;
}

.tab-button:hover {
    background-color: #303030; /* Subtle hover */
    color: #fff;
}

.tab-button.active {
    background-color: #2a2a2a; /* Darker active background */
    color: #a0c8ff; /* Brighter blue */
    font-weight: 600; /* Bolder */
    border-left: 3px solid #a0c8ff; /* Use left border for active state */
}

/* Remove the ::after pseudo-element for active state */
.tab-button.active::after {
    content: none;
}

.tab-button.loading {
    color: #a0c8ff; /* Match active color */
    font-style: italic;
    /* Add a subtle loading indicator if desired, e.g., background pulse */
}

/* Tab Panels Container */
.tab-panels {
    flex-grow: 1;
    overflow: hidden;
}

.tab-panel {
    display: none;
    height: 100%;
    animation: fadeIn 0.3s ease-out; /* Fade-in animation */
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Styles */
.dns-section,
.whois-section,
.cert-section,
.subdomain-section {
    background: transparent;
    padding: 0; /* Remove padding here, handle in children */
    margin-bottom: 0;
}

.dns-section h4,
.whois-section h4,
.cert-section h4,
.subdomain-section h4 {
    margin-top: 0;
    color: #ddd;
    font-size: 1.1em; /* Slightly larger */
    font-weight: 500;
    margin-bottom: 15px; /* Increased margin */
    padding-bottom: 8px; /* Increased padding */
    border-bottom: 1px solid #444;
}

/* DNS Record Styles */
.record-section {
    margin-bottom: 20px; /* Increased spacing */
}

.record-section h5 {
    margin: 15px 0 8px 0; /* Adjusted margins */
    color: #ccc; /* Lighter */
    font-size: 0.95em;
    font-weight: 500;
}

.record-list {
    list-style-type: none;
    padding-left: 0; /* Remove default padding */
    margin: 0;
}

.record-list li {
    margin-bottom: 8px; /* Increased spacing */
    padding: 10px 12px; /* Increased padding */
    background: #2e2e2e; /* Slightly lighter background */
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #3a3a3a; /* Subtle border */
    display: flex; /* Use flexbox for alignment */
    flex-wrap: wrap; /* Allow wrapping */
    align-items: baseline;
    line-height: 1.6;
}

.record-list li strong { /* Style the record name */
    color: #eee;
    margin-right: 10px;
    font-weight: 500;
}

.ttl {
    color: #888; /* Darker gray */
    font-size: 11px;
    margin: 0 8px;
    font-family: monospace;
    white-space: nowrap;
}

.record-data {
    color: #b8b8ff; /* Lighter purple/blue */
    font-family: monospace; /* Monospace for data */
    word-break: break-all; /* Break long data */
    flex-grow: 1; /* Allow data to take remaining space */
    margin-left: 5px; /* Space before data */
}

/* Special handling for SOA */
.record-list li.soa-record {
    font-family: monospace;
    font-size: 12px;
    color: #bbb;
}

/* WHOIS Data Styles */
.whois-table,
.ssl-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.whois-table td,
.ssl-info-table td {
    padding: 10px 8px; /* Increased padding */
    border-bottom: 1px solid #3a3a3a; /* Lighter border */
    vertical-align: top; /* Align top */
    line-height: 1.5;
}

.whois-table tr:last-child td,
.ssl-info-table tr:last-child td {
    border-bottom: none; /* Remove border on last row */
}

.whois-table td:first-child,
.ssl-info-table td:first-child {
    width: 25%; /* Adjusted width */
    color: #aaa;
    font-weight: 500; /* Slightly bolder labels */
    padding-right: 15px; /* More space after label */
}

.whois-table td:last-child,
.ssl-info-table td:last-child {
    color: #ddd; /* Lighter value text */
    font-family: monospace; /* Monospace for consistency */
    word-break: break-word;
}

/* Certificate Styles */
.cert-count,
.subdomain-count {
    font-size: 13px;
    color: #aaa;
    margin-bottom: 15px; /* Increased margin */
    padding-left: 5px;
}

.cert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 5px;
}

.cert-table th {
    text-align: left;
    color: #ccc;
    padding: 10px 8px; /* Increased padding */
    border-bottom: 2px solid #4a4a4a; /* Stronger header border */
    font-weight: 500;
    background-color: #2a2a2a; /* Header background */
}

.cert-table td {
    padding: 9px 8px; /* Adjusted padding */
    border-bottom: 1px solid #3a3a3a; /* Lighter row border */
    color: #bbb;
    word-break: break-all;
    vertical-align: middle; /* Better alignment */
}

.cert-table tr {
    transition: background-color 0.15s ease;
}

.cert-table tr:hover {
    background-color: #333;
}

/* Style specific cert columns */
.cert-table td:nth-child(2), /* Common Name */
.cert-table td:nth-child(3) { /* Alt Names */
    font-family: monospace;
    color: #ccc;
}
.cert-table td:nth-child(4), /* Issued */
.cert-table td:nth-child(5) { /* Expires */
    font-family: monospace;
    white-space: nowrap;
}

.more-certs,
.more-subdomains {
    font-size: 12px;
    color: #999;
    font-style: italic;
    text-align: center;
    margin-top: 15px;
    padding: 5px;
}

/* Subdomain Styles */
.subdomain-list {
    list-style-type: none;
    padding-left: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Use gap for spacing */
}

.subdomain-list li {
    margin: 0; /* Remove margin, use gap */
    background: #383838; /* Slightly lighter pill background */
    padding: 5px 10px; /* Adjusted padding */
    border-radius: 12px; /* More rounded pills */
    font-size: 12px;
    border: 1px solid #484848; /* Subtle border */
    transition: background-color 0.2s ease;
}

.subdomain-list li:hover {
    background: #454545;
}

.subdomain-list li a {
    color: #aaddff; /* Lighter blue */
    text-decoration: none;
    font-family: monospace;
}

.subdomain-list li a:hover {
    text-decoration: none;
    color: #cceeff; /* Even lighter on hover */
}

/* Placeholder for no data */
.no-data {
    color: #888;
    font-style: italic;
    font-size: 14px; /* Slightly larger */
    text-align: center;
    padding: 30px 15px; /* More padding */
    background-color: rgba(0, 0, 0, 0.05); /* Very subtle background */
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-container {
        padding: 15px;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-list {
        flex-direction: row;
        width: 100%;
        overflow-x: auto; /* Allow horizontal scrolling */
        border-right: none;
        border-bottom: 1px solid #444;
        margin-right: 0;
        margin-bottom: 20px; /* Space below tabs */
        white-space: nowrap; /* Prevent wrapping */
    }

    .tab-button {
        padding: 12px 15px; /* Adjust padding */
        border-bottom: none;
        border-right: 1px solid #333;
        border-left: none; /* Remove left border */
        margin-left: 0;
        position: relative; /* Needed for ::after */
        border-top: 3px solid transparent; /* Placeholder for top border */
        margin-top: -3px; /* Compensate */
    }
    
    .tab-button:last-child {
        border-right: none;
    }

    .tab-button.active {
        border-left: none; /* Remove left border */
        border-top: 3px solid #a0c8ff; /* Use top border for active state */
        background-color: #303030; /* Match hover background */
    }

    .whois-table td:first-child,
    .ssl-info-table td:first-child {
        width: 35%; /* Adjust label width */
    }

    .cert-table th:nth-child(3), /* Hide Alt names */
    .cert-table td:nth-child(3) {
        /* Consider showing it, but maybe truncated */
         /* display: none; */
    }
}

@media (max-width: 480px) {
    .domain-header h3 {
        font-size: 1.15em;
    }
    .domain-subtitle {
        font-size: 0.8em;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .record-list li {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .whois-table, .ssl-info-table {
        font-size: 12px;
    }
    .whois-table td, .ssl-info-table td {
        padding: 8px 5px;
    }
     .whois-table td:first-child,
     .ssl-info-table td:first-child {
         width: 30%;
         padding-right: 8px;
     }


    .subdomain-list li {
        padding: 4px 8px;
        font-size: 11px;
    }

    .cert-table {
        font-size: 11px;
    }
    .cert-table th, .cert-table td {
        padding: 6px 5px;
    }

    /* Optionally hide less critical columns on very small screens */
    .cert-table th:nth-child(1), /* Issuer */
    .cert-table td:nth-child(1) {
        /* display: none; */
    }
}

/* Print styles */
@media print {
    body {
        background-color: #fff;
        color: #000;
    }
    .result-container, .header, .navigation, footer, .tool-description, .bookmarklet, button, textarea {
        display: none; /* Hide non-essential elements */
    }

    .tool-input #result-container { /* Force show results for printing */
        display: block !important;
        background: none;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
    }

    .domain-header, .tabs-container {
        border: none;
    }

    .domain-header h3, .domain-subtitle {
        color: #000;
    }

    .tab-list {
        display: none; /* Hide tabs */
    }

    .tab-panels {
        width: 100%;
    }

    .tab-panel {
        display: block !important; /* Show all panels */
        margin-bottom: 20px;
        page-break-inside: avoid;
        animation: none; /* Disable animation */
    }

    .dns-section,
    .whois-section,
    .cert-section,
    .subdomain-section {
        border: 1px solid #ccc;
        padding: 10px;
        margin-bottom: 15px; /* Space between sections */
    }

    .dns-section h4, .whois-section h4, .cert-section h4, .subdomain-section h4 {
       color: #000;
       border-bottom: 1px solid #ccc;
    }

    .record-list li,
    .whois-table td,
    .ssl-info-table td,
    .cert-table td,
    .cert-table th,
    .subdomain-list li {
        background: none;
        border-color: #ddd;
        color: #333;
    }
    .record-data, .subdomain-list li a {
        color: #0056b3; /* Standard link blue for print */
    }
    .ttl, .cert-count, .subdomain-count, .no-data {
        color: #555;
    }
    .whois-table td:first-child, .ssl-info-table td:first-child {
        color: #222;
    }
    .cert-table th {
        color: #000;
        background: #eee;
    }
} 