/* Base styles and variables */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --text-color: #2b2d42;
    --text-light: #8d99ae;
    --background-light: #f8f9fa;
    --background-dark: #edf2f4;
    --success-color: #52b788;
    --error-color: #e63946;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

button {
    cursor: pointer;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Header and Navigation */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-link{
    display: flex;
}

.logo-text{
    display: inline-block;
    align-content: center;
}

.geo {
    color: "#f72585";
}

.ip {
    color: var(--primary-color);
}

.api {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

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

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #24292e;
    color: #fff !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.github-link:hover {
    background-color: #000;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    width: 400px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.accent {
    color: var(--accent-color);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--background-dark);
}

/* Features Section */
.features {
    background-color: #fff;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--background-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    user-select: none;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* Demo Section */
.demo {
    background-color: var(--background-dark);
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.demo-form {
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#ip-input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
}

#ip-input:focus {
    outline: none;
}

#lookup-btn {
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    font-weight: 600;
}

#lookup-btn:hover {
    background-color: var(--secondary-color);
}

.demo-result {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: none;
}

.demo-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--background-dark);
}

.demo-result-header h3 {
    margin: 0;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
}

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

.result-flag-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background-color: var(--background-light);
}

.result-content {
    padding: 1rem;
}

.result-content pre {
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* API Docs Section */
.docs {
    background-color: #fff;
}

.docs-container {
    max-width: 900px;
    margin: 0 auto;
}

.endpoint-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.endpoint-card {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.endpoint-method {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.endpoint-path {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.endpoint-example {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    background-color: #f0f0f0;
    padding: 0.5rem;
    border-radius: 4px;
}

.endpoint-example code {
    flex: 1;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

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

.response-example {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.response-json {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.docs-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Python Usage Section */
.python-usage {
    background-color: var(--background-dark);
}

.code-container {
    max-width: 700px;
    margin: 0 auto;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.code-block {
    background-color: #282c34;
    color: #abb2bf;
    padding: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    font-family: 'Fira Code', monospace;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.code-block code {
    display: block;
    white-space: pre;
}

/* Why Self-Host Section */
.why-self-host {
    background-color: var(--background-dark);
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.reason-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    justify-items: center;
    user-select: none;
}

.reason-card:hover {
    transform: translateY(-5px);
}

.reason-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Deployment Section */
.deployment {
    background-color: #fff;
}

.deployment-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.deployment-card {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.deployment-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.deployment-card pre {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-family: 'Fira Code', monospace;
    text-align: left;
    font-size: 0.8rem;
}

/* About Section */
.about {
    background-color: var(--background-dark);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.about-text {
    flex: 2;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
footer {
    background-color: #2b2d42;
    color: #fff;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #edf2f4;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #edf2f4;
}

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

/* Responsive Styles */
@media (max-width: 900px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-image {
        width: 300px;
        height: 300px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    section {
        padding: 60px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    #lookup-btn {
        border-radius: 0;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Syntax highlighting for JSON */
.key {
    color: #c678dd;
}

.string {
    color: #98c379;
}

.number {
    color: #d19a66;
}

.boolean {
    color: #56b6c2;
}

.null {
    color: #e06c75;
}