/* exploit.team theme - terminal-inspired dark aesthetic */
:root {
    --bg: #0d0d0d;
    --bg-card: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text: #cccccc;
    --text-bright: #ffffff;
    --text-muted: #888888;
    --text-dim: #666666;
    --border: #2a2a2a;
    --border-hover: #444444;
    --success: #28ca41;
    --warning: #ffbd2e;
    --danger: #f87171;
    --terminal-red: #ff5f57;
    --terminal-yellow: #ffbd2e;
    --terminal-green: #28ca41;
}

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

body {
    font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
    background: var(--bg);
    min-height: 100vh;
    padding: 24px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* Subtle grid overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

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

header {
    text-align: center;
    color: var(--text-bright);
    margin-bottom: 40px;
    padding-top: 40px;
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 12px;
    font-weight: 500;
    letter-spacing: -0.02em;
}

header h1::before {
    content: '# ';
    color: var(--text-muted);
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
}

.subtitle::before {
    content: '> ';
    color: var(--text-dim);
}

/* Terminal window styling for sections */
.section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.terminal-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-header .dot.red {
    background: var(--terminal-red);
}

.terminal-header .dot.yellow {
    background: var(--terminal-yellow);
}

.terminal-header .dot.green {
    background: var(--terminal-green);
}

.section-content {
    padding: 32px;
}

.hidden {
    display: none !important;
}

/* Search Section */
.search-inputs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.search-row {
    display: flex;
    gap: 12px;
}

#keywords-input {
    flex: 1;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-bright);
    transition: border-color 0.2s ease;
}

#comments-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-bright);
    transition: border-color 0.2s ease;
    resize: vertical;
    min-height: 72px;
}

#keywords-input::placeholder,
#comments-input::placeholder {
    color: var(--text-dim);
}

#keywords-input:focus,
#comments-input:focus {
    outline: none;
    border-color: var(--text-muted);
}

button {
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: var(--bg);
    background: var(--text-bright);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: lowercase;
    letter-spacing: 0.05em;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

button:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    box-shadow: none;
}

.hint {
    color: var(--text-dim);
    font-size: 12px;
    text-align: center;
}

.hint::before {
    content: '// ';
    color: var(--text-dim);
}

/* TLD Selector */
.tld-selector {
    margin: 24px 0 20px 0;
    padding: 20px;
    background: var(--bg);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.tld-selector-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.tld-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tld-checkbox:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.tld-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 14px;
    height: 14px;
    accent-color: var(--success);
}

.tld-checkbox input[type="checkbox"]:checked + .tld-label {
    color: var(--text-bright);
    font-weight: 500;
}

.tld-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.tld-checkbox.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tld-checkbox.disabled:hover {
    border-color: var(--border);
    transform: none;
}

.tld-label {
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.tld-hint {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    margin: 0;
}

/* Loading Section */
.loading-container {
    text-align: center;
    padding: 32px;
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--text-bright);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#loading-title {
    color: var(--text-bright);
    font-weight: 500;
    margin-bottom: 24px;
    font-size: 16px;
}

#loading-title::before {
    content: '$ ';
    color: var(--text-muted);
}

.loading-steps {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.step::before {
    content: '  ';
}

.step.active {
    color: var(--text-bright);
}

.step.completed {
    color: var(--success);
}

.step-icon {
    width: 24px;
    font-size: 14px;
    margin-right: 12px;
    font-family: inherit;
}

.step.active .step-icon {
    animation: blink 1s step-end infinite;
}

.step.completed .step-icon::before {
    content: '[ok]';
    color: var(--success);
    font-size: 11px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.loading-note {
    margin-top: 24px;
    color: var(--text-dim);
    font-size: 12px;
}

.loading-note::before {
    content: '// ';
}

/* Results Section */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 24px 24px 0 24px;
}

.results-header h2 {
    color: var(--text-bright);
    font-weight: 500;
    font-size: 16px;
}

.results-header h2::before {
    content: '# ';
    color: var(--text-muted);
}

#results-container {
    padding: 0 24px 24px 24px;
}

.domain-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.domain-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.domain-info h3 {
    color: var(--text-bright);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.domain-info h3::before {
    content: '> ';
    color: var(--text-dim);
}

.domain-status {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-available {
    background: rgba(40, 202, 65, 0.15);
    color: var(--success);
    border: 1px solid rgba(40, 202, 65, 0.3);
}

.badge-unavailable {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.badge-premium {
    background: rgba(255, 189, 46, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 189, 46, 0.3);
}

.seo-analysis {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-hover);
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
}

.seo-analysis strong {
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.1em;
}

.domain-price {
    text-align: right;
    flex-shrink: 0;
    margin-left: 20px;
}

.price {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.registrar {
    font-size: 11px;
    color: var(--text-dim);
}

/* Error Section */
.error-container {
    text-align: center;
    padding: 32px;
}

.error-container h2 {
    color: var(--danger);
    margin-bottom: 12px;
    font-weight: 500;
}

.error-container h2::before {
    content: '[error] ';
    color: var(--danger);
    font-size: 12px;
}

#error-message {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 13px;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-dim);
    padding: 32px 20px;
    font-size: 12px;
}

footer p {
    margin-bottom: 8px;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--text-bright);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 16px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .section-content {
        padding: 20px;
    }

    .search-inputs {
        gap: 12px;
    }

    .search-row {
        flex-direction: column;
        gap: 12px;
    }

    .tld-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 6px;
    }

    .tld-checkbox {
        padding: 6px 10px;
    }

    .domain-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .domain-price {
        text-align: left;
        margin-left: 0;
    }

    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* Terminal cursor animation */
@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--text-bright);
    margin-left: 2px;
    animation: cursor-blink 1s step-end infinite;
}
