/* Enhanced DNS-specific styles following spec */
.domain-card {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

body.light-mode .domain-card {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.domain-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.light-mode .domain-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.domain-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: #4285f4;
    margin: 0;
}

.domain-tier {
    background: #333;
    color: #4285f4;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

body.light-mode .domain-tier {
    background: #f0f0f0;
}

.tier-tier1 { background: #666 !important; color: #ccc !important; }
.tier-tier2 { background: #ff9800 !important; color: white !important; }
.tier-tier3 { background: #4caf50 !important; color: white !important; }

/* Status indicators per specification */
.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #2a2a2a;
}

body.light-mode .status-indicator {
    border-color: white;
}

.status-ok { background: #4caf50; }           /* Green - no changes in 24h */
.status-changed { background: #ff9800; }     /* Yellow/Orange - found new records */
.status-deleted { background: #f44336; }     /* Red - some records deleted */
.status-pending { background: #2196f3; }     /* Blue - never scanned */
.status-overdue { background: #f44336; }     /* Red - scan overdue */

.domain-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.info-item {
    text-align: center;
}

.info-label {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

body.light-mode .info-label {
    color: #666;
}

.info-value {
    font-weight: 500;
    color: #e0e0e0;
}

body.light-mode .info-value {
    color: #333;
}

.scan-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-scanning { background: #ff9800; }
.status-completed { background: #4caf50; }
.status-failed { background: #f44336; }
.status-pending { background: #2196f3; }
.status-overdue { background: #f44336; }

/* DNS Records display */
.dns-records {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #333;
    animation: slideDown 0.3s ease-out;
}

body.light-mode .dns-records {
    border-top: 1px solid #eee;
}

.dns-records.show {
    display: block;
}

.dns-table {
    width: 100%;
    margin-top: 15px;
    font-size: 13px;
    border-collapse: collapse;
}

.dns-table th,
.dns-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

body.light-mode .dns-table th,
body.light-mode .dns-table td {
    border-bottom: 1px solid #eee;
}

.dns-table th {
    background: #333;
    color: #ccc;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

body.light-mode .dns-table th {
    background: #fafafa;
    color: #666;
}

/* Enhanced record type styling per spec */
.record-type {
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.record-A { background: #4285f4; }
.record-AAAA { background: #9c27b0; }
.record-MX { background: #ff9800; }
.record-TXT { background: #4caf50; }
.record-NS { background: #795548; }
.record-CNAME { background: #e91e63; }
.record-SRV { background: #607d8b; }
.record-CAA { background: #ff5722; }
.record-PTR { background: #3f51b5; }
.record-DNSKEY { background: #673ab7; }
.record-RRSIG { background: #009688; }
.record-NSEC { background: #8bc34a; }
.record-NSEC3 { background: #cddc39; color: #333; }
.record-DS { background: #ffc107; color: #333; }
.record-TLSA { background: #f44336; }
.record-SMIMEA { background: #e91e63; }
.record-NAPTR { background: #9e9e9e; }
.record-LOC { background: #00bcd4; }
.record-SSHFP { background: #ff9800; }
.record-SPF { background: #4caf50; }

/* Version controls */
.version-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    background: #333;
    border-radius: 6px;
    flex-wrap: wrap;
}

body.light-mode .version-controls {
    background: #f5f5f5;
}

.version-select {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-select label {
    font-size: 12px;
    color: #ccc;
    margin: 0;
    white-space: nowrap;
}

body.light-mode .version-select label {
    color: #666;
}

.version-select select {
    padding: 4px 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #2a2a2a;
    color: #e0e0e0;
    font-size: 12px;
    min-width: 200px;
}

body.light-mode .version-select select {
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

.version-badge {
    background: #4285f4;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.version-badge.latest {
    background: #4caf50;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    background: #4285f4;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #3367d6;
}

.btn-small.secondary {
    background: #666;
}

.btn-small.secondary:hover {
    background: #555;
}

/* Changes display */
.compare-versions {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #333;
    border-radius: 6px;
}

body.light-mode .compare-versions {
    background: #f9f9f9;
}

.compare-versions.show {
    display: block;
}

.change-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 13px;
}

.change-added {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
}

.change-removed {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.change-modified {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
}

.change-icon {
    font-weight: bold;
    width: 16px;
    text-align: center;
}

.change-added .change-icon { color: #4caf50; }
.change-removed .change-icon { color: #f44336; }
.change-modified .change-icon { color: #ff9800; }

.no-domains {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

body.light-mode .no-domains {
    color: #666;
}

.no-domains h3 {
    margin-bottom: 10px;
    color: #666;
}

body.light-mode .no-domains h3 {
    color: #888;
}

/* Frequency indicators per spec */
.frequency-indicator {
    font-size: 11px;
    color: #888;
}

.frequency-tier1::after { content: " (Daily)"; }
.frequency-tier2::after { content: " (Hourly)"; }
.frequency-tier3::after { content: " (10min)"; }

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .domain-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dns-table {
        font-size: 12px;
    }
    
    .dns-table th,
    .dns-table td {
        padding: 6px 8px;
    }
    
    .version-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
}