/* ===== FindCellID v2 — Dark Modern UI ===== */

:root {
    --bg-primary: #0a0e1a;
    --bg-card: #111827;
    --bg-card-hover: #1a2332;
    --border: #1e293b;
    --border-focus: #3b82f6;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --success: #10b981;
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

.container {
    position: relative; z-index: 1;
    max-width: 720px; margin: 0 auto;
    padding: 24px 16px; min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ===== Header ===== */
.header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 32px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-glow);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.logo h1 {
    font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

.tg-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    color: #60a5fa; text-decoration: none;
    font-size: 0.85rem; font-weight: 500;
    transition: all 0.2s;
}

.tg-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px; margin-bottom: 20px;
    transition: border-color 0.3s;
}

.card:hover { border-color: rgba(59, 130, 246, 0.15); }

.card h2 {
    font-size: 1.1rem; font-weight: 600;
    margin-bottom: 20px; color: var(--text-primary);
}

/* ===== Form ===== */
.form-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.05em;
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem; font-family: 'Inter', sans-serif;
    transition: all 0.2s; outline: none;
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.hint { font-size: 0.72rem; color: var(--text-muted); }

/* ===== Radio Type Selector ===== */
.radio-selector {
    display: flex; gap: 8px; margin-bottom: 20px;
}

.radio-option {
    flex: 1; cursor: pointer;
}

.radio-option input { display: none; }

.radio-option span {
    display: block; text-align: center;
    padding: 10px 0; font-size: 0.85rem; font-weight: 600;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all 0.2s;
}

.radio-option input:checked + span {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: #60a5fa;
    box-shadow: 0 0 0 1px var(--accent);
}

.radio-option:hover span {
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-secondary);
}

/* ===== Button ===== */
.btn-primary {
    width: 100%; padding: 14px;
    background: var(--accent); color: white; border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem; font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* ===== Presets ===== */
.presets {
    display: flex; align-items: center; gap: 8px;
    margin-top: 16px; flex-wrap: wrap;
}

.preset-label { font-size: 0.78rem; color: var(--text-muted); }

.preset-btn {
    padding: 5px 12px; background: transparent;
    border: 1px solid var(--border); border-radius: 20px;
    color: var(--text-secondary); font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--accent); color: #60a5fa;
    background: var(--accent-glow);
}

/* ===== Results ===== */
.result-card { animation: slideUp 0.4s ease-out; }

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

.result-info {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 20px;
}

.result-item {
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px; background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

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

.result-item .value {
    font-size: 1rem; font-weight: 600; color: var(--text-primary);
}

.result-item .value.accent { color: #60a5fa; }
.result-item.full { grid-column: 1 / -1; }

.result-actions {
    display: flex; gap: 8px; margin-bottom: 16px;
}

.result-actions a {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px; border-radius: var(--radius-sm);
    text-decoration: none; font-size: 0.85rem; font-weight: 500;
    transition: all 0.2s;
}

.btn-google {
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.2);
    color: #60a5fa;
}

.btn-google:hover {
    background: rgba(66, 133, 244, 0.2);
}

/* ===== Map ===== */
.map-container {
    width: 100%; height: 350px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ===== Error ===== */
.error-card {
    background: var(--error-bg);
    border-color: rgba(239, 68, 68, 0.2);
    animation: slideUp 0.4s ease-out;
}

.error-card p { color: #fca5a5; font-weight: 500; }

/* ===== Footer ===== */
.footer {
    margin-top: auto; padding-top: 24px;
    text-align: center; color: var(--text-muted); font-size: 0.8rem;
}

.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: #60a5fa; }

/* ===== Responsive ===== */
@media (max-width: 520px) {
    .header { flex-direction: column; gap: 16px; align-items: flex-start; }
    .form-grid { gap: 12px; }
    .card { padding: 20px; }
    .result-info { grid-template-columns: 1fr; }
    .map-container { height: 280px; }
    .radio-selector { gap: 6px; }
    .radio-option span { padding: 8px 0; font-size: 0.8rem; }
}
