/* 
 * RealDomainDNS - Global DNS Propagation Checker
 * Main Stylesheet
 */

/* Base Styles and Reset */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --light-color: #f3f4f6;
    --dark-color: #1e3a8a;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hidden {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

code {
    font-family: monospace;
    background-color: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

/* Header */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
    }
}

/* Text Logo */
.text-logo {
    display: flex;
    flex-direction: column;
    color: white;
    text-align: center;
}

.logo-main {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.logo-sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-color);
}

@media (min-width: 768px) {
    .text-logo {
        text-align: left;
    }
}

/* Search Bar */
.search-bar {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

.dns-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-group {
    flex: 1;
    min-width: 120px;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn .icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    fill: currentColor; /* Ensures the SVG icon has the same color as the text */
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1e40af;
}

.btn-secondary {
    background-color: white;
    color: var(--text-color);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.btn-donate {
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 10px;
}

.btn-donate:hover {
    background-color: #0ea271;
    text-decoration: none;
    color: white;
}

.settings-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 250px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-top: 5px;
    box-shadow: var(--box-shadow);
    z-index: 10;
}

.settings-panel label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .content-wrapper {
        flex-direction: row;
        gap: 30px;
    }
    
    .results-section {
        flex: 2;
    }
    
    .info-section {
        flex: 1;
    }
}

.results-header {
    margin-bottom: 1.5rem;
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .results-container {
        flex-direction: row;
    }
    
    .results-table {
        flex: 3;
    }
    
    .results-map-container {
        flex: 2;
        position: sticky;
        top: 20px;
        align-self: flex-start;
    }
}

.results-loading {
    padding: 2rem;
    text-align: center;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.results-list {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f9f9f9;
}

.result-flag {
    margin-right: 10px;
}

.flag-placeholder {
    width: 24px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.result-info {
    flex: 1;
}

.result-location {
    font-weight: 500;
    margin-bottom: 2px;
}

.result-provider {
    font-size: 0.8rem;
    color: #666;
}

.result-value {
    font-family: monospace;
    margin-right: 10px;
    text-align: right;
    word-break: break-all;
    color: var(--secondary-color);
}

.result-status {
    width: 20px;
    text-align: center;
}

.status-success {
    color: var(--success-color);
}

.status-error {
    color: var(--error-color);
}

.results-map {
    height: 300px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 20px;
}

.results-details {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
}

.details-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.details-back {
    margin-right: auto;
    font-size: 0.9rem;
}

.details-flag {
    margin-bottom: 15px;
}

.details-flag .flag-placeholder {
    width: 32px;
    height: 24px;
    font-size: 10px;
}

.details-content {
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

/* Info Section */
.info-section {
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .info-section {
        margin-top: 0;
        padding-left: 30px;
        border-left: 1px solid var(--border-color);
    }
}

.record-types-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
}

.record-types-list li {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.tool-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    transition: var(--transition);
    color: var(--text-color);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
    text-decoration: none;
    border-color: var(--secondary-color);
}

.tool-card h3 {
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.tool-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Partner Sites */
.partner-sites {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.partner-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    transition: var(--transition);
    color: var(--text-color);
}

.partner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
    text-decoration: none;
    background-color: white;
    border-color: var(--accent-color);
}

.partner-card h3 {
    color: var(--accent-color);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.partner-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #666;
}

/* Ad Spaces */
.ad-space {
    margin-bottom: 20px;
}

.ad-placeholder {
    background-color: #f1f1f1;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
}

.header-ad .ad-placeholder {
    width: 100%;
    height: 90px;
}

.sidebar-ad .ad-placeholder {
    width: 100%;
    height: 250px;
}

.content-ad .ad-placeholder {
    width: 100%;
    height: 90px;
    margin: 2rem 0;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 576px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.footer-section p {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bdc3c7;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-links a {
    font-size: 0.9rem;
    color: #bdc3c7;
}

.footer-links a:hover {
    color: white;
}

/* Tool Pages */
.tool-nav {
    background-color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.main-nav li {
    margin: 0;
    padding: 0;
}

.main-nav a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.main-nav li.active a {
    background-color: var(--secondary-color);
    color: white;
    font-weight: 500;
}

.tool-page {
    background-color: white;
    border-radius: 4px;
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.tool-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* IP Display Page */
.ip-display {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .ip-display {
        grid-template-columns: 1fr 1fr;
    }
}

.ip-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.ip-value {
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 15px 0;
    word-break: break-all;
}

.ip-type {
    color: #666;
    font-size: 0.9rem;
}

.ip-details {
    margin-bottom: 30px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th,
.details-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.details-table th {
    width: 200px;
    font-weight: 500;
    color: var(--dark-color);
}

.tool-info {
    margin-top: 30px;
}

.tool-info h2 {
    margin-top: 30px;
    font-size: 1.5rem;
}

.tool-info ul {
    margin-bottom: 20px;
}

.tool-info li {
    margin-bottom: 10px;
}

/* DNS Lookup Page */
.dns-lookup-form {
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.lookup-domain {
    flex: 2;
    min-width: 200px;
}

.lookup-type {
    flex: 1;
    min-width: 150px;
}

.lookup-submit {
    flex: 0 0 auto;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.lookup-results {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
}

.lookup-placeholder {
    text-align: center;
    color: #666;
    padding: 30px 0;
}

.loading-indicator {
    text-align: center;
    color: #666;
    padding: 30px 0;
}

.lookup-header {
    margin-bottom: 20px;
}

.lookup-header h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.lookup-header p {
    color: #666;
    margin-bottom: 0;
}

.lookup-data {
    margin-bottom: 20px;
}

.record-item {
    margin-bottom: 20px;
}

.record-header {
    font-weight: 700;
    padding: 10px;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.record-content {
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    overflow-x: auto;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
}

.record-table th,
.record-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.record-table th {
    background-color: #f1f1f1;
    font-weight: 500;
}

.record-table tr:last-child td {
    border-bottom: none;
}

.lookup-footer {
    color: #666;
    font-size: 0.9rem;
}

.lookup-footer p {
    margin-bottom: 5px;
}

.record-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0 30px;
}

.record-type-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
}

.record-type-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.record-type-card p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.record-type-card code {
    display: block;
    padding: 8px;
    margin-top: 5px;
    background-color: #f1f1f1;
    border-radius: 4px;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* Example Boxes */
.example-box {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.example-box p {
    margin-bottom: 10px;
}

.example-box ol, 
.example-box ul {
    margin-bottom: 0;
}

/* WHOIS Results */
.whois-header {
    margin-bottom: 20px;
}

.whois-header h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.whois-data {
    margin-bottom: 20px;
}

.whois-content {
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid var(--border-color);
}

.whois-footer {
    color: #666;
    font-size: 0.9rem;
}

.whois-footer p {
    margin-bottom: 5px;
}

/* SSL Certificate Checker */
.ssl-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.ssl-status {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 4px;
    flex: 1;
    min-width: 250px;
}

.ssl-valid {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
}

.ssl-expired {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
}

.ssl-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
}

.status-icon {
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
    color: var(--success-color);
}

.ssl-expired .status-icon {
    color: var(--error-color);
}

.ssl-warning .status-icon {
    color: var(--warning-color);
}

.status-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.status-text p {
    margin: 0;
    color: #666;
}

.ssl-expiry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex: 1;
    min-width: 250px;
}

.expiry-label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #666;
}

.expiry-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.ssl-details {
    margin-bottom: 30px;
}

.ssl-details h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ssl-details h3:first-child {
    margin-top: 0;
}

.ssl-recommendations {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
}

.ssl-recommendations h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendations-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.recommendations-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recommendation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
}

.recommendation-success .recommendation-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.recommendation-warning .recommendation-icon {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.recommendation-error .recommendation-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.recommendation-info .recommendation-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.recommendation-text {
    flex: 1;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .dns-form {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .tool-page {
        padding: 20px 15px;
    }
    
    .details-table th {
        width: 120px;
    }
}
