/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles - Matching Nafezly */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e9ecef;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 35px;
    width: auto;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    min-width: 600px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
}

.nav.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.nav-section h3 {
    color: #495057;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.3rem;
}

.nav-section a {
    text-decoration: none;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-section a:hover,
.nav-section a.active {
    background-color: #f8f9fa;
    color: #007bff;
}

.nav-section i {
    font-size: 0.8rem;
    width: 16px;
}

.lang-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.lang-btn:hover {
    background: #e9ecef;
}

.menu-btn {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.menu-btn:hover {
    background: #e9ecef;
}

/* Main Content */
.main {
    padding: 1.5rem 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb i {
    font-size: 0.7rem;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    color: #212529;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* DNS Lookup Section */
.dns-section {
    margin-bottom: 2.5rem;
}

.dns-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

/* Search Form */
.search-form {
    margin-bottom: 1.5rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

.input-wrapper label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

#domainInput {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
}

#domainInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-lookup {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-lookup:hover:not(:disabled) {
    background: #0056b3;
}

.btn-lookup:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-lookup.searching {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-lookup.searching i {
    animation: spin 1s linear infinite;
}

/* Record Types */
.record-types {
    margin-bottom: 1.5rem;
}

.record-types h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.type-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.type-checkbox:hover {
    background-color: #f8f9fa;
}

.type-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.type-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.type-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.type-label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

/* Quick Select */
.quick-select {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-quick {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-quick:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #007bff;
}

/* Quick Examples */
.quick-examples {
    margin-bottom: 1rem;
}

.quick-examples h3 {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-align: center;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.btn-example {
    background: white;
    color: #6c757d;
    border: 2px solid #dee2e6;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.btn-example:hover {
    border-color: #007bff;
    color: #007bff;
    background: #f8f9fa;
}

.btn-example i {
    font-size: 1.2rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.loading-text {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff 0%, #28a745 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.results-header h3 {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
}

.domain-badge {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

/* DNS Summary */
.dns-summary {
    margin-bottom: 2rem;
}

.summary-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.9rem;
}

.summary-value {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

/* Records Container */
.records-container {
    margin-bottom: 2rem;
}

.record-group {
    margin-bottom: 2rem;
}

.record-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.record-list {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.record-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f3f4;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    transition: background-color 0.2s ease;
}

.record-item:hover {
    background-color: #f8f9fa;
}

.record-item:last-child {
    border-bottom: none;
}

.record-type {
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
}

.record-value {
    font-family: 'Courier New', monospace;
    color: #495057;
    font-size: 0.9rem;
    word-break: break-all;
}

.record-ttl {
    color: #6c757d;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
}

/* Record Type Colors */
.record-type.A { background: #d4edda; color: #155724; }
.record-type.AAAA { background: #d1ecf1; color: #0c5460; }
.record-type.MX { background: #f8d7da; color: #721c24; }
.record-type.NS { background: #fff3cd; color: #856404; }
.record-type.TXT { background: #e2e3e5; color: #383d41; }
.record-type.CNAME { background: #fce4ec; color: #880e4f; }
.record-type.SOA { background: #e8f5e8; color: #2e7d32; }
.record-type.PTR { background: #fff8e1; color: #f57c00; }

/* Export Actions */
.export-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.btn-export,
.btn-copy,
.btn-refresh {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-export:hover {
    background: #1e7e34;
}

.btn-copy {
    background: #007bff;
}

.btn-copy:hover {
    background: #0056b3;
}

.btn-refresh {
    background: #6c757d;
}

.btn-refresh:hover {
    background: #5a6268;
}

/* Info Section - Two Column Layout */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-section .info-card,
.about-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.info-section .info-card h2,
.about-card h2 {
    color: #495057;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.info-section .info-card i {
    color: #007bff;
}

.info-section .info-card p,
.about-card p {
    color: #6c757d;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* DNS Guide */
.dns-guide {
    margin-bottom: 2.5rem;
}

.dns-guide h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guide-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.guide-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.guide-header i {
    font-size: 2rem;
    color: #007bff;
}

.guide-header h3 {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.guide-card p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Popular Tools */
.popular-tools {
    margin-bottom: 2rem;
}

.popular-tools h2 {
    text-align: center;
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.tool-card {
    background: white;
    padding: 1.2rem;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.tool-card:hover,
.tool-card.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #007bff;
}

.tool-card i {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: #007bff;
}

.tool-card span {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 0.8rem;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.footer-logo {
    height: 35px;
    margin-bottom: 0.8rem;
}

.footer-section p {
    color: #6c757d;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-links a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: #e9ecef;
    border-radius: 6px;
    text-align: center;
    line-height: 35px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: #007bff;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.4rem;
}

.footer-section ul a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        min-width: 280px;
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .dns-card {
        padding: 1.2rem;
    }

    .input-group {
        flex-direction: column;
    }

    .types-grid {
        grid-template-columns: 1fr 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .summary-card {
        grid-template-columns: 1fr;
    }

    .record-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .export-actions {
        grid-template-columns: 1fr 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .guide-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .dns-card {
        padding: 1rem;
    }

    .types-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .export-actions {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.4s ease-in;
}

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

.slide-up {
    animation: slideUp 0.4s ease-out;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Additional Utility Classes */
.text-center { text-align: center; }
.text-muted { color: #6c757d; }
.d-none { display: none; }
.d-block { display: block; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }