:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.main-nav {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-color);
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-form {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#domain {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-color);
}

#domain:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

#searchBtn {
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

#searchBtn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

#searchBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

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

.results {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    min-height: 200px;
}

.welcome-message {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.welcome-message h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.status-bar {
    background: var(--bg-color);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

.status-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.results-container {
    max-height: 600px;
    overflow-y: auto;
}

.subdomain-item {
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    animation: slideIn 0.3s ease-out;
}

.subdomain-item:hover {
    background: var(--bg-color);
}

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

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

.subdomain-name {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.subdomain-source {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-ct {
    background: #dbeafe;
    color: var(--primary-color);
}

.source-dns {
    background: #d1fae5;
    color: var(--success-color);
}

.error-message {
    padding: 2rem;
    text-align: center;
    background: #fef2f2;
    color: var(--error-color);
    border-radius: 8px;
    margin: 1rem;
}

.loading-message {
    padding: 2rem;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-dot:nth-child(1) { animation-delay: 0s; }
.progress-dot:nth-child(2) { animation-delay: 0.3s; }
.progress-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes pulse {
    0%, 80%, 100% {
        background: var(--border-color);
        transform: scale(0.8);
    }
    40% {
        background: var(--primary-color);
        transform: scale(1);
    }
}

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

    header h1 {
        font-size: 2rem;
    }

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

    #searchBtn {
        width: 100%;
    }

    .status-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .subdomain-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}