:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --primary: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --terminal-bg: #020617;
    --terminal-text: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.logo h1 {
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse {
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.input-wrapper {
    display: flex;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    width: 400px;
    transition: all 0.3s;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
}

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover { background: #2563eb; }
button:disabled { background: #475569; cursor: not-allowed; }

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    height: 350px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terminal {
    flex: 1;
    background: var(--terminal-bg);
    color: var(--terminal-text);
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-y: auto;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--terminal-bg); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

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

@media (max-width: 1024px) {
    .grid-container { grid-template-columns: 1fr; }
    .header { flex-direction: column; gap: 1.5rem; }
    .input-wrapper { width: 100%; }
}

@media (max-width: 600px) {
    .app-container { padding: 1rem; }
    .input-wrapper { flex-direction: column; background: transparent; border: none; }
    #target { background: var(--card-bg); border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.5rem; }
    button { border-radius: 8px; margin-bottom: 0.5rem; padding: 1rem; width: 100%; border: none !important; }
    .card { height: 300px; }
    .terminal { font-size: 0.75rem; padding: 1rem; }
}
