@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

:root {
    /* Primary Colors - SCAM AI Orange Theme */
    --primary: #ff8c42;
    --secondary: #ffa366;
    --success: #00ff88;
    --warning: #ffaa00;
    --bg-dark: #0a0a0a;
    --bg-medium: #151515;
    --bg-light: #1a1a1a;
    --text: #ffffff;
    --text-dim: #888888;

    /* Existing color scheme (for compatibility) */
    --bg-terminal: #141414;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --accent-red: #ff3333;
    --accent-cyan: #ff8c42;
    --accent-green: #00ff88;
    --accent-blue: #00d9ff;
    --accent-yellow: #ffaa00;
    --border-color: #ff8c42;
}

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Scanline Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(transparent, rgba(255, 140, 66, 0.3), transparent);
    animation: scan 4s linear infinite;
    pointer-events: none;
    z-index: 1000;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* Cyber Grid Background - NEW */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(255, 140, 66, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 140, 66, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Animated particles */
.matrix-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 140, 66, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(192, 132, 252, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(255, 140, 66, 0.06) 0%, transparent 50%);
    animation: particle-float 15s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

/* Main container */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Terminal window - Solid Background + Animated Border */
.terminal-window {
    background: #0f0f0f;
    border: 2px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 60px rgba(255, 140, 66, 0.4),
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 140, 66, 0.2);
    position: relative;
}

/* Animated gradient border */
.terminal-window::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        #ff8c42,
        #ffa366,
        #ff8c42,
        #ff7829);
    background-size: 400% 400%;
    border-radius: 16px;
    z-index: -1;
    animation: gradient-rotate 6s ease infinite;
}

@keyframes gradient-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.terminal-header {
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--primary);
    box-shadow: 0 2px 10px rgba(255, 140, 66, 0.2);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

.dot:nth-child(1) { background: #ff5555; }
.dot:nth-child(2) { background: #ffaa00; }
.dot:nth-child(3) { background: #00ff88; }

.terminal-title {
    color: var(--text-dim);
    font-size: 14px;
    letter-spacing: 2px;
    flex: 1;
    text-align: center;
}

.terminal-links {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 4px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 140, 66, 0.5);
}

.terminal-body {
    padding: 30px;
}

/* ASCII Art Header */
.ascii-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.ascii-art {
    color: var(--primary);
    font-size: 12px;
    line-height: 1.2;
    white-space: pre;
    text-shadow: 0 0 10px currentColor;
    animation: glow 2s ease-in-out infinite alternate, glitch 8s infinite;
    position: relative;
}

/* Enhanced glow effect */
@keyframes glow {
    from { text-shadow: 0 0 10px currentColor; }
    to { text-shadow: 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px rgba(255, 140, 66, 0.5); }
}

/* Glitch effect */
@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 1;
    }
    91% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    92% {
        transform: translate(2px, -2px);
        opacity: 0.9;
    }
    93% {
        transform: translate(-2px, -2px);
        opacity: 0.85;
    }
    94% {
        transform: translate(0);
        opacity: 1;
    }
}

/* Threat Box - Solid with Better Contrast */
.threat-box {
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin: 30px auto;
    max-width: 600px;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px 0 rgba(255, 140, 66, 0.3), inset 0 0 60px rgba(255, 140, 66, 0.05);
}

.threat-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, var(--primary), transparent);
    animation: border-glow 3s linear infinite;
    z-index: -1;
}

@keyframes border-glow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.threat-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.warning-icon {
    display: inline-block;
    margin: 0 10px;
    color: var(--warning);
    animation: blink 1s infinite;
}

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

.threat-title {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.threat-subtitle {
    color: var(--text-dim);
    font-size: 14px;
}

.alert-mode {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 140, 66, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.mode-label {
    color: var(--text-dim);
    font-size: 12px;
}

.mode-indicator {
    padding: 5px 15px;
    background: var(--primary);
    color: var(--text);
    border-radius: 3px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
}

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

/* Scanner Section */
.scanner-section {
    margin: 40px 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 16px;
}

.section-header::before {
    content: '▶';
    margin-right: 10px;
    animation: arrow-pulse 1s infinite;
}

@keyframes arrow-pulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.feature-list {
    list-style: none;
    margin-left: 20px;
}

.feature-item {
    padding: 8px 0;
    color: var(--text-dim);
    position: relative;
    padding-left: 30px;
    transition: color 0.3s;
}

.feature-item:hover {
    color: var(--success);
}

.feature-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Input Section */
.input-section {
    margin: 40px 0;
}

.input-label {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.input-label::before {
    content: '▲';
    margin-right: 10px;
    color: var(--warning);
    animation: spin 2s linear infinite;
}

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

.scan-form {
    display: block;
}

.input-container {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.contract-input {
    flex: 1;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 140, 66, 0.3);
    padding: 15px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.contract-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 140, 66, 0.3);
}

.contract-input::placeholder {
    color: var(--text-dim);
}

.scan-button {
    background: linear-gradient(135deg, var(--primary), #ff7829);
    border: 2px solid var(--primary);
    color: var(--text);
    padding: 15px 40px;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
}

.scan-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.scan-button:hover::before {
    width: 300px;
    height: 300px;
}

.scan-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 140, 66, 0.6), 0 0 40px rgba(255, 140, 66, 0.3);
}

.scan-button:active {
    transform: translateY(-2px) scale(0.98);
}

.scan-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status Bar */
.status-bar {
    margin-top: 40px;
    padding: 20px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 140, 66, 0.3);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-label {
    color: var(--text-dim);
    font-size: 12px;
}

.status-value {
    color: var(--success);
    font-weight: bold;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: indicator-pulse 1s infinite;
}

@keyframes indicator-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    margin-top: 40px;
}

.loading.active {
    display: block;
}

.loading-text {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 20px;
}

.loading-bar {
    width: 400px;
    height: 8px;
    background: #0a0a0a;
    border: 2px solid #ff8c42;
    border-radius: 4px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 140, 66, 0.3);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff8c42, #ffaa66);
    width: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 140, 66, 0.8);
}

.progress-steps {
    margin-top: 20px;
    color: var(--text-dim);
    font-size: 12px;
}

/* Results Section */
.results-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 140, 66, 0.3);
    border-radius: 4px;
    display: none;
}

.results-section.active {
    display: block;
    animation: slideIn 0.5s ease-out;
}

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

.result-header {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 140, 66, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.token-name {
    color: var(--text-primary);
    font-size: 24px;
    margin-bottom: 10px;
}

.token-address {
    color: var(--text-dim);
    font-size: 12px;
    word-break: break-all;
}

.social-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Risk Banner */
.risk-banner {
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.risk-banner.danger {
    background: rgba(255, 0, 64, 0.2);
    border: 2px solid var(--primary);
}

.risk-banner.warning {
    background: rgba(255, 170, 0, 0.2);
    border: 2px solid var(--warning);
}

.risk-banner.safe {
    background: rgba(0, 255, 136, 0.2);
    border: 2px solid var(--success);
}

.risk-text {
    font-size: 24px;
}

.risk-percentage {
    font-size: 48px;
}

/* Analysis Section */
.analysis-section {
    margin: 30px 0;
}

.analysis-title {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 140, 66, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: #151515;
    border: 1px solid rgba(255, 140, 66, 0.3);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 140, 66, 0.2);
}

.info-card:hover::before {
    opacity: 1;
}

.info-card h3 {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 140, 66, 0.2);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-label {
    color: var(--text-dim);
    font-size: 14px;
}

.info-value {
    color: var(--text-primary);
    font-weight: bold;
}

.info-value.danger {
    color: var(--primary);
}

.info-value.warning {
    color: var(--warning);
}

.info-value.safe {
    color: var(--success);
}

/* Red Flags */
.red-flags {
    margin-top: 20px;
}

.flag-item {
    padding: 10px;
    margin: 8px 0;
    background: rgba(255, 140, 66, 0.1);
    border-left: 3px solid var(--primary);
    border-radius: 2px;
}

.flag-item.warning {
    background: rgba(255, 170, 0, 0.1);
    border-left-color: var(--warning);
}

/* Holders Table */
.holders-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.holders-table th,
.holders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.holders-table th {
    color: var(--primary);
    font-weight: bold;
}

.holders-table td {
    color: var(--text-primary);
    font-size: 12px;
}

.wallet-address {
    font-family: monospace;
    color: var(--text-dim);
}

/* Error Section */
.error-section {
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 140, 66, 0.2);
    border: 2px solid var(--primary);
    border-radius: 4px;
    display: none;
}

.error-section.active {
    display: block;
}

.error-message {
    color: var(--text);
    font-size: 14px;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    border-top: 1px solid rgba(255, 140, 66, 0.2);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.footer-link {
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.3s;
    letter-spacing: 1px;
}

.footer-link:hover {
    color: var(--primary);
}

.disclaimer {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 11px;
}

.copyright {
    margin-top: 15px;
    color: var(--text-dim);
    font-size: 10px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal-title {
        font-size: 10px;
    }

    .terminal-links {
        display: none;
    }

    .ascii-art {
        font-size: 8px;
    }

    .result-header {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

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

    .scan-button {
        width: 100%;
    }

    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .risk-banner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 10px;
    }

    .terminal-body {
        padding: 15px;
    }

    .ascii-art {
        font-size: 6px;
        overflow-x: auto;
    }

    .threat-box {
        padding: 15px;
    }

    .threat-title {
        font-size: 16px;
    }

    .scanner-section {
        margin: 20px 0;
    }

    .input-section {
        margin: 20px 0;
    }

    .contract-input,
    .scan-button {
        padding: 12px;
        font-size: 12px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .token-name {
        font-size: 18px;
    }

    .risk-percentage {
        font-size: 36px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}
