:root {
    --bg-base: #020617;
    --card-bg: rgba(15, 23, 42, 0.7);
    --border-stroke: rgba(16, 185, 129, 0.2);
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(2, 6, 23, 0.6);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

.glow-bg {
    position: fixed;
    top: 10%;
    right: 20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

.app-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header { text-align: center; }
.logo { font-size: 2.5rem; font-weight: 700; background: linear-gradient(135deg, #34d399, #10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-top: 0.5rem; }

main { display: flex; flex-direction: column; gap: 2rem; }

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-stroke);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.tabs { display: flex; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 1rem; }
.tab-btn {
    background: transparent; border: none; color: var(--text-muted); font-family: inherit;
    font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: 0.3s; padding: 0.5rem 1rem; border-radius: 8px;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.tab-btn.active { color: var(--primary); background: rgba(16, 185, 129, 0.1); }

.input-group { display: none; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; animation: fadeIn 0.3s ease; }
.input-group.active { display: flex; }

label { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

input, select {
    background: var(--input-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.2s;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-glow); }

.helper { font-size: 0.85rem; color: #64748b; }
.hidden { display: none !important; }

.primary-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; border: none; border-radius: 12px; padding: 1.2rem; font-family: inherit;
    font-size: 1.1rem; font-weight: 700; width: 100%; cursor: pointer; transition: all 0.2s; margin-top: 1rem;
    display: flex; justify-content: center; align-items: center; gap: 0.5rem;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--primary-glow); }
.primary-btn.loading .btn-text { display: none; }
.primary-btn.loading .loader { display: block; }

.loader {
    width: 24px; height: 24px; border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%; border-top-color: white; animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Results Section */
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-stroke); padding-bottom: 1rem;}
.results-header h3 { font-size: 1.5rem; }
.badge { background: rgba(16, 185, 129, 0.2); color: var(--primary); font-size: 0.9rem; padding: 0.2rem 0.6rem; border-radius: 20px; vertical-align: middle;}

.secondary-btn {
    background: transparent; color: var(--text-main); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px; padding: 0.6rem 1.2rem; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-family: inherit; transition: 0.2s;
}
.secondary-btn:hover { background: rgba(255,255,255,0.1); border-color: white; }
.icon { flex-shrink: 0; }

.results-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; max-height: 500px; overflow-y: auto; padding-right: 10px;}
.results-container::-webkit-scrollbar { width: 8px; }
.results-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.result-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1rem; word-break: break-word; font-size: 0.9rem;
    transition: 0.2s;
}
.result-card:hover { border-color: var(--primary); background: rgba(16, 185, 129, 0.05); }

.result-row { margin-bottom: 0.5rem; }
.result-row:last-child { margin-bottom: 0; }
.result-key { color: var(--primary); font-weight: 600; text-transform: capitalize;}
.result-value { color: var(--text-muted); }

.no-data { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 2rem; font-style: italic; }
