:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #151922;
    --bg-tertiary: #1e2531;
    --text-primary: #ffffff;
    --text-secondary: #8b92a9;
    --text-muted: #6b7280;
    --accent-orange: #f4a261;
    --accent-orange-hover: #e76f51;
    --accent-orange-dark: #e9c46a;
    --terminal-bg: #000000;
    --terminal-text: #00ff00;
    --border-color: #2a3142;
    --success-color: #10b981;
    --error-color: #ef4444;
}

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

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

/* Header */
header {
    background: var(--bg-secondary);
    padding: 2.5rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.header-content {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 3px;
    color: var(--accent-orange);
    text-shadow: 0 0 20px rgba(244, 162, 97, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.beta-badge {
    font-size: 0.8rem;
    background: var(--accent-orange-hover);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(231, 111, 81, 0.4);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto 0.5rem;
}

.subtitle-secondary {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
}

.chain-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.chain-btn {
    padding: 0.85rem 1.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.chain-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chain-btn.active {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.4);
    color: #000;
}

.chain-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chain-btn.active .chain-icon {
    width: 28px;
    height: 28px;
}

.chain-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.badge {
    font-size: 0.65rem;
    background: var(--bg-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    font-weight: 500;
}

/* Main Container */
.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    width: 100%;
}

/* Input Section */
.input-section {
    margin-bottom: 3rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

#addressInput {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

#addressInput:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}

#addressInput::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    padding: 1.25rem 2.5rem;
    background: var(--accent-orange);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 162, 97, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

/* Captcha */
.captcha-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    max-width: 300px;
}

.captcha-question {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

#captchaInput {
    width: 60px;
    padding: 0.4rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    font-family: 'Courier New', monospace;
}

#captchaInput:focus {
    outline: none;
    border-color: var(--accent-orange);
}

#captchaInput:disabled {
    opacity: 0.6;
}

.btn-captcha {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-captcha:hover:not(:disabled) {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #000;
}

.btn-captcha:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.captcha-error {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 6px;
    color: var(--error-color);
    font-size: 0.85rem;
    text-align: center;
}

/* Error Message */
.error-message {
    max-width: 900px;
    margin: 1rem auto 0;
    padding: 1rem 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error-color);
    border-radius: 8px;
    color: var(--error-color);
    font-size: 0.95rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-content {
    max-width: 400px;
    margin: 0 auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loading-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Terminal Report */
.report-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal {
    background: var(--terminal-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

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

.terminal-button.red {
    background: #ff5f56;
}

.terminal-button.yellow {
    background: #ffbd2e;
}

.terminal-button.green {
    background: #27c93f;
}

.terminal-title {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.copy-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #000;
}

.terminal-content {
    padding: 2rem;
    color: var(--terminal-text);
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-content::-webkit-scrollbar {
    width: 10px;
}

.terminal-content::-webkit-scrollbar-track {
    background: var(--terminal-bg);
}

.terminal-content::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Report Footer */
.report-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cache-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    padding: 1.5rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-tech {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 0.8rem;
    max-width: 900px;
    margin: 0 auto 1rem;
    line-height: 1.6;
    padding: 1rem;
    background: rgba(244, 162, 97, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(244, 162, 97, 0.1);
}

.footer-stats {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.footer-stats span {
    color: var(--accent-orange);
    font-weight: 600;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .subtitle-secondary {
        font-size: 0.85rem;
    }

    .chain-selector {
        flex-direction: column;
        max-width: 300px;
    }

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

    .captcha-box {
        max-width: 100%;
        justify-content: center;
    }

    .terminal-content {
        font-size: 0.8rem;
        padding: 1.5rem;
    }

    .report-footer {
        flex-direction: column;
    }

    .footer-disclaimer {
        font-size: 0.75rem;
    }
}