/* DNS Kontrol Sistemi - Ana Stil Dosyası */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.search-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s;
    background: #f8f9fa;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102,126,234,0.3);
}

.search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.results-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.results-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.domain-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.results-content {
    padding: 30px;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    position: relative; /* Tooltip'ın düşünmesi için */
}

.records-table th,
.records-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    position: relative; /* Tooltip için */
}

.records-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.records-table tr {
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.records-table tr:hover {
    background: #f8f9fa;
}

.records-table tr.active {
    background: #e8f4fd;
}

/* Accordion detay satırı */
.record-details {
    display: none;
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    animation: slideDown 0.3s ease-out;
}

.record-details.show {
    display: table-row;
}

.record-details td {
    padding: 20px 15px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-content {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.6;
}

.detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-description {
    color: #555;
    margin-bottom: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.detail-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    background: white;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.info-label {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-value {
    color: #333;
    font-family: monospace;
    word-break: break-all;
}

.detail-recommendations {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.recommendation-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.recommendation-list {
    list-style: none;
    padding: 0;
}

.recommendation-list li {
    color: #856404;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.recommendation-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .detail-info {
        grid-template-columns: 1fr;
    }
    
    .detail-content {
        font-size: 0.9rem;
    }
}

.record-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    position: relative;
}

.type-a { background: #10b981; }
.type-aaaa { background: #3b82f6; }
.type-cname { background: #8b5cf6; }
.type-mx { background: #f59e0b; }
.type-ns { background: #ef4444; }
.type-txt { background: #6b7280; }
.type-soa { background: #84cc16; }
.type-caa { background: #f97316; }
.type-cert { background: #06b6d4; }
.type-dname { background: #a855f7; }
.type-dnskey { background: #ec4899; }
.type-ds { background: #14b8a6; }
.type-loc { background: #f59e0b; }
.type-naptr { background: #8b5cf6; }
.type-ptr { background: #6366f1; }
.type-spf { background: #10b981; }
.type-srv { background: #f97316; }
.type-sshfp { background: #64748b; }
.type-tlsa { background: #dc2626; }
.type-uri { background: #7c3aed; }

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.summary-card.summary-error { border-color: #ef4444; }
.summary-card.summary-warning { border-color: #f59e0b; }
.summary-card.summary-ok { border-color: #10b981; }

.summary-icon { font-size: 2.5rem; }
.summary-card.summary-error .summary-icon { color: #ef4444; }
.summary-card.summary-warning .summary-icon { color: #f59e0b; }
.summary-card.summary-ok .summary-icon { color: #10b981; }

.summary-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 2% auto 2% 5%; /* Sol taraftan biraz boşluk bırak */
    padding: 0;
    border-radius: 15px;
    width: 90%; /* Genişliği artırdık */
    max-width: 800px; /* Maksimum genişliği artırdık */
    max-height: 85vh; /* Yüksekliği biraz artırdık */
    overflow: hidden;
    animation: slideIn 0.3s;
    position: relative;
    left: 0;
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
}

.close:hover { opacity: 0.7; }

.modal-body {
    padding: 35px; /* Padding'ı artırdık */
    max-height: 70vh; /* Yüksekliği artırdık */
    overflow-y: auto;
}

.detail-item {
    padding: 18px; /* Padding artırıldı */
    margin-bottom: 18px; /* Margin artırıldı */
    border-radius: 10px; /* Köşe yuvarlama artırıldı */
    border-left: 4px solid;
}

.detail-item.detail-error {
    background: #fef2f2;
    border-color: #ef4444;
}

.detail-item.detail-warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.detail-item.detail-ok {
    background: #f0f9ff;
    border-color: #10b981;
}

.detail-type {
    font-weight: 600;
    font-size: 1rem; /* Font boyutu artırıldı */
    text-transform: uppercase;
    margin-bottom: 10px; /* Margin artırıldı */
    display: flex;
    align-items: center;
    gap: 10px; /* Gap artırıldı */
}

.detail-message {
    font-size: 1.1rem; /* Font boyutu artırıldı */
    line-height: 1.6; /* Satır yüksekliği artırıldı */
}

.error-message {
    background: #fef2f2;
    color: #ef4444;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    margin: 20px 0;
}

.responsive-table {
    overflow-x: auto;
    position: relative; /* Tooltip'ın görünmesi için */
    z-index: 1; /* Base z-index */
}

/* Alert stilları */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    border-left-color: #28a745;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
    border-left-color: #ffc107;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    border-left-color: #dc3545;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #b8daff;
    border-left-color: #17a2b8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

    .search-form {
        flex-direction: column;
    }

    .header h1 {
        font-size: 2rem;
    }

    .search-container,
    .results-container,
    .history-container {
        padding: 20px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 96%; /* Mobilde biraz daha geniş */
        margin: 3% auto; /* Mobilde ortala */
        max-width: none;
        max-height: 90vh; /* Mobilde daha yüksek */
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}
