:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.icon {
    margin-right: 8px;
}

/* Loading State */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.info-card.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    grid-column: span 2;
}

.card-header h2,
.card-header h3 {
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5rem;
}

.card-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.info-card.primary .card-header h2 {
    color: white;
}

/* IP Display */
.ip-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.ip-display {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ip-display:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.ip-type {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
    margin-bottom: 12px;
}

.copy-ip-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-ip-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.fqdn-section {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.fqdn-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

.fqdn-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    word-break: break-all;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fqdn-display:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ISP Info */
.isp-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.org-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Location Info */
.location-info,
.security-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-row,
.security-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.location-row:last-child,
.security-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 500;
    color: var(--text-secondary);
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.safe {
    background: #dcfce7;
    color: var(--success-color);
}

.status.warning {
    background: #fef3c7;
    color: var(--warning-color);
}

.status.danger {
    background: #fecaca;
    color: var(--danger-color);
}

/* Map */
.map-container {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.map-container h3 {
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.map {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

/* Additional Info */
.additional-info {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:last-child {
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

/* Actions */
.actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--card-background);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-card.primary {
        grid-column: span 1;
    }
    
    .ip-display {
        font-size: 2rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .copy-ip-button {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .fqdn-display {
        font-size: 1rem;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .info-row span:last-child {
        max-width: 100%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .info-card {
        padding: 16px;
    }
    
    .map {
        height: 300px;
    }
    
    .ip-display {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: #0f172a;
        --card-background: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #64748b;
        --border-color: #334155;
    }
}

/* Animation for content reveal */
.content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
