/* web-dns - Main Stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-body);
}

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

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

header h1 {
    color: var(--text-header);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: var(--text-subheader);
    font-size: 1.1rem;
}

.theme-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.theme-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-subheader);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.search-box {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: var(--bg-card);
    color: var(--text-body);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.search-form button {
    padding: 15px 30px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: var(--accent-hover);
}

.error {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.results {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid var(--border);
}

.results h2 {
    color: var(--text-header);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

/* Async Results Container */
.results-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 1px solid var(--border);
}

.results-container h2 {
    color: var(--text-header);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.dns-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.dns-section:last-child {
    border-bottom: none;
}

.dns-section h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dns-timing {
    font-size: 0.8rem;
    color: var(--text-subheader);
    font-weight: normal;
}

.dns-loading {
    color: var(--text-subheader);
    font-style: italic;
    padding: 15px;
    background: var(--table-header);
    border-radius: 8px;
}

.dns-content {
    animation: fadeIn 0.3s ease-in;
}

.dns-error {
    padding: 15px;
    background: var(--error-bg);
    border-radius: 8px;
    margin-top: 10px;
}

.no-data {
    color: var(--text-subheader);
    font-style: italic;
    padding: 15px;
}

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

.section {
    margin-bottom: 25px;
}

.section h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.record-table th,
.record-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.record-table th {
    background: var(--table-header);
    font-weight: 600;
    color: var(--text-body);
}

.record-table tr:hover {
    background: var(--table-header);
    opacity: 0.8;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: var(--badge-success);
    color: var(--badge-success-text);
}

.badge-warning {
    background: var(--badge-warning);
    color: var(--badge-warning-text);
}

.badge-info {
    background: var(--badge-info);
    color: var(--badge-info-text);
}

.txt-record {
    background: var(--txt-bg);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 8px;
    word-break: break-all;
    border: 1px solid var(--border);
}

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-subheader);
    font-size: 0.9rem;
}

/* Cyber theme specific effects */
.theme-cyber .search-box,
.theme-cyber .results {
    backdrop-filter: blur(10px);
}

.theme-cyber .badge {
    border: 1px solid currentColor;
}

/* Glassmorphism theme effects */
.theme-glass .search-box,
.theme-glass .results {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.theme-glass .theme-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.theme-glass .theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
}

.theme-glass .theme-btn.active {
    background: rgba(0, 212, 255, 0.3);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.theme-glass .badge {
    border: 1px solid currentColor;
    backdrop-filter: blur(5px);
}

.theme-glass .record-table th {
    backdrop-filter: blur(10px);
}

.theme-glass .txt-record {
    backdrop-filter: blur(5px);
}

/* Minimal theme specific styles */
.theme-minimal .search-box,
.theme-minimal .results {
    box-shadow: none;
    border: 1px solid var(--border);
}

.theme-minimal .theme-btn {
    border-radius: 4px;
    border: 1px solid var(--border);
}

.theme-minimal .theme-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.theme-minimal .badge {
    border: 1px solid var(--border);
    background: transparent;
}

.theme-minimal .record-table th {
    background: transparent;
    border-bottom: 2px solid var(--border);
}

.theme-minimal .record-table td {
    border-bottom: 1px solid var(--border);
}

.theme-minimal .txt-record {
    border: 1px solid var(--border);
    background: transparent;
}
