/* Professional IP Dashboard Theme */
:root {
    /* Colors */
    --bg-app: #f8f9fa;
    --bg-panel: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    --primary: #2563eb;
    /* Professional Blue */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-app);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-box {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.logo-img {
    width: 24px;
    height: 24px;
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-badge {
    font-size: 0.65rem;
    background: var(--text-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

/* Search */
.search-container {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    display: flex;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    background: var(--bg-panel);
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.kbd-shortcut {
    position: absolute;
    right: 8px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-app);
    pointer-events: none;
}

.btn-primary {
    padding: 0 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.top-actions .action-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.top-actions .action-link:hover {
    color: var(--text-primary);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px 0;
    flex: 1;
}

/* Status Bar */
.status-bar {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-bar.loading {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.status-bar.error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.ip-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.badge {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ip-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ip-display h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.location-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.location-display,
.coords-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.coords-display {
    color: var(--text-tertiary);
    font-size: 1rem;
}



/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.data-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.icon-box.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-box.green {
    background: #d1fae5;
    color: var(--success);
}

.icon-box.red {
    background: #fee2e2;
    color: var(--danger);
}

.icon-box.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.card-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Data Lists */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 0.9rem;
}

.data-label {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.data-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
    max-width: 60%;
}

.mono-font {
    font-family: var(--font-mono);
}

/* Threat Box */
.threat-score-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-app);
    border-radius: var(--radius-md);
}

.score-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-circle span:first-child {
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1;
}

.score-label {
    font-size: 0.5rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.threat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e8f0;
    color: var(--text-secondary);
    font-weight: 500;
}

.tag.danger {
    background: #fee2e2;
    color: var(--danger);
}

.tag.warning {
    background: #fef3c7;
    color: var(--warning);
}

.tag.safe {
    background: #d1fae5;
    color: var(--success);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Footer */
.app-footer {
    margin-top: auto;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 16px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }

    .search-container {
        order: 3;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .brand {
        flex: 1;
    }

    .ip-display h2 {
        font-size: 1.8rem;
    }
}

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