* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
header { text-align: center; margin-bottom: 1.5rem; }
h1 { font-size: 1.8rem; color: #facc15; }
.subtitle { color: #94a3b8; font-size: 0.9rem; margin-top: 0.3rem; }

.search-box { margin-bottom: 1.5rem; }
.input-row {
    display: flex;
    gap: 0.5rem;
}
#query {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #334155;
    border-radius: 12px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}
#query:focus { border-color: #facc15; }
#btn-search, #btn-mic {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}
#btn-search { background: #facc15; color: #0f172a; }
#btn-mic { background: #334155; color: #e2e8f0; }
#btn-search:hover { transform: scale(1.05); }
#btn-mic:hover { background: #475569; }
#btn-mic.recording { background: #ef4444; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.mic-status { text-align: center; margin-top: 0.5rem; color: #ef4444; font-size: 0.85rem; }
.hidden { display: none !important; }

.message {
    background: #1e293b;
    border-left: 4px solid #facc15;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    white-space: pre-line;
    font-size: 0.95rem;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 2rem;
    color: #94a3b8;
}
.spinner {
    width: 24px; height: 24px;
    border: 3px solid #334155;
    border-top-color: #facc15;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results { display: flex; flex-direction: column; gap: 0.8rem; }

.card {
    background: #1e293b;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #334155;
    transition: border-color 0.2s;
}
.card:hover { border-color: #facc15; }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.card-name { font-weight: 600; font-size: 1.05rem; color: #f1f5f9; }
.card-status { font-size: 1.2rem; }
.card-operator { color: #94a3b8; font-size: 0.85rem; }
.card-address { color: #64748b; font-size: 0.85rem; margin: 0.3rem 0; }
.card-connectors {
    display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0;
}
.chip {
    background: #334155;
    color: #facc15;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.card-meta { color: #64748b; font-size: 0.8rem; }
.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}
.card-links {
    display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap;
}
.card-links a {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-decoration: none;
    background: #334155;
    color: #e2e8f0;
    transition: background 0.2s;
}
.card-links a:hover { background: #475569; }

.card.highlight { border-color: #facc15; box-shadow: 0 0 12px rgba(250,204,21,0.2); }

.btn-detail {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-decoration: none;
    background: #334155;
    color: #e2e8f0;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-detail:hover { background: #475569; }
.arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.7rem;
}
.arrow.up { transform: rotate(180deg); }

.card-detail {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #334155;
}
.detail-section {
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    color: #94a3b8;
}
.detail-title {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.2rem;
}
.detail-section a { color: #facc15; text-decoration: none; }
.detail-section a:hover { text-decoration: underline; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.2rem; }
.chip-pay { background: #1e3a5f; color: #93c5fd; }

.btn-nearby {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    background: #1e3a2e;
    color: #86efac;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-nearby:hover { background: #22543d; }

.nearby-section {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #334155;
}
.nearby-title {
    font-weight: 600;
    color: #86efac;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.nearby-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #1e293b;
}
.nearby-item:last-child { border-bottom: none; }
.nearby-name {
    font-weight: 500;
    color: #f1f5f9;
    font-size: 0.9rem;
}
.nearby-meta {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0.2rem 0;
}
.nearby-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.nearby-links a {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    text-decoration: none;
    background: #334155;
    color: #e2e8f0;
    transition: background 0.2s;
}
.nearby-links a:hover { background: #475569; }
.nearby-empty {
    color: #64748b;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #1e293b;
    color: #475569;
    font-size: 0.8rem;
}
footer a { color: #facc15; text-decoration: none; }
