:root {
    --primary: #00D4AA;
    --primary-dim: rgba(0, 212, 170, 0.12);
    --accent: #00B4D8;
    --accent-dim: rgba(0, 180, 216, 0.12);
    --bg: #0A0F14;
    --bg-card: rgba(16, 22, 30, 0.85);
    --bg-elevated: #111820;
    --bg-input: rgba(10, 15, 20, 0.9);
    --text: #D0D7DE;
    --text-sec: #8B949E;
    --text-muted: #484F58;
    --border: rgba(139, 148, 158, 0.08);
    --radius: 10px;
    --radius-sm: 6px;

    --type-a: #00D4AA;
    --type-aaaa: #00B4D8;
    --type-cname: #F5A623;
    --type-mx: #BD10E0;
    --type-txt: #F39C12;
    --type-ns: #3498DB;
    --type-soa: #E74C3C;
    --type-srv: #2ECC71;

    --font: 'Inter', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0, 212, 170, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.app-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 15, 20, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.25rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-dim);
    border-radius: var(--radius-sm);
}

.app-title {
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    font-size: 0.625rem;
    color: var(--text-sec);
}

.header-actions {
    display: flex;
    gap: 4px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00B894);
    color: #0A0F14;
}

.btn-primary:hover {
    box-shadow: 0 3px 12px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-sec);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-elevated);
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.625rem;
}

.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Search */
.search-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.search-bar {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-prefix {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.875rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.type-select {
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.6875rem;
    outline: none;
}

.bulk-toggle {
    margin-top: 6px;
}

.bulk-label {
    font-size: 0.625rem;
    color: var(--text-sec);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bulk-textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.75rem;
    outline: none;
    resize: vertical;
    margin-top: 8px;
}

/* Status */
.status-bar {
    text-align: center;
    padding: 10px;
    font-size: 0.75rem;
    color: var(--text-sec);
}

.status-spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Results */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.domain-result {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

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

.domain-name {
    font-size: 0.9rem;
    font-weight: 800;
    font-family: var(--mono);
}

.domain-summary {
    font-size: 0.5625rem;
    color: var(--text-muted);
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table th {
    font-size: 0.5625rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

.records-table td {
    font-size: 0.6875rem;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-family: var(--mono);
}

.records-table tr:hover {
    background: rgba(0, 212, 170, 0.03);
}

.type-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.5rem;
    font-weight: 700;
}

.type-A .type-badge {
    background: rgba(0, 212, 170, 0.15);
    color: var(--type-a);
}

.type-AAAA .type-badge {
    background: rgba(0, 180, 216, 0.15);
    color: var(--type-aaaa);
}

.type-CNAME .type-badge {
    background: rgba(245, 166, 35, 0.15);
    color: var(--type-cname);
}

.type-MX .type-badge {
    background: rgba(189, 16, 224, 0.15);
    color: var(--type-mx);
}

.type-TXT .type-badge {
    background: rgba(243, 156, 18, 0.15);
    color: var(--type-txt);
}

.type-NS .type-badge {
    background: rgba(52, 152, 219, 0.15);
    color: var(--type-ns);
}

.type-SOA .type-badge {
    background: rgba(231, 76, 60, 0.15);
    color: var(--type-soa);
}

.type-SRV .type-badge {
    background: rgba(46, 204, 113, 0.15);
    color: var(--type-srv);
}

.ttl-val {
    color: var(--text-sec);
    font-size: 0.625rem;
}

.record-value {
    word-break: break-all;
    max-width: 400px;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
}

.copy-btn:hover {
    color: var(--primary);
}

/* History */
.history-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 100ms;
}

.history-item:hover {
    background: var(--primary-dim);
}

.history-domain {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
}

.history-time {
    font-size: 0.5625rem;
    color: var(--text-muted);
}

.app-footer {
    text-align: center;
    padding: 12px;
    font-size: 0.625rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .search-bar {
        flex-wrap: wrap;
    }

    .records-table {
        font-size: 0.6rem;
    }
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 148, 158, 0.15);
    border-radius: 3px;
}