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

:root {
    --bg-color: #e0e5ec;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
.header {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow:
        9px 9px 16px var(--shadow-dark),
        -9px -9px 16px var(--shadow-light);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 20px;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--bg-color);
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--accent-color);
    box-shadow:
        2px 2px 6px var(--shadow-dark),
        -2px -2px 6px var(--shadow-light);
    transform: translateY(-1px);
}

.nav-link:active {
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

.nav-link-blog {
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    color: white;
    box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.nav-link-blog:hover {
    color: white;
    opacity: 0.9;
}

.logo-small {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Content Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    gap: 20px;
    margin-bottom: 20px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Neomorphic Card */
.card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow:
        9px 9px 16px var(--shadow-dark),
        -9px -9px 16px var(--shadow-light);
}

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

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    margin-top: 20px;
    color: var(--text-primary);
}

.section-title {
    font-size: 1.1rem;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--bg-color);
    box-shadow:
        0 2px 4px var(--shadow-dark),
        0 -1px 2px var(--shadow-light);
}

/* IP Display */
.ip-display {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background: var(--bg-color);
    border-radius: 15px;
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 600;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Input Group */
.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.ip-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.ip-input:focus {
    outline: none;
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

.ip-input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.trace-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--accent-color);
    cursor: pointer;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    transition: all 0.3s ease;
}

.trace-btn:hover {
    color: var(--accent-hover);
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
}

.trace-btn:active {
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

/* Map Container */
.map-container {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow:
        inset 6px 6px 12px var(--shadow-dark),
        inset -6px -6px 12px var(--shadow-light);
}

/* Ad Banners */
.ad-banner {
    background: var(--bg-color);
    border-radius: 15px;
    box-shadow:
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-banner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.ad-top,
.ad-bottom {
    min-height: 90px;
    height: auto;
    margin-bottom: 20px;
    padding: 0;
}

.ad-side {
    width: 160px;
    min-height: 600px;
    height: auto;
}

/* AdSense styling */
.adsbygoogle {
    display: block;
    text-align: center;
}

.ad-banner ins {
    margin: 0;
    padding: 0;
}

/* Messages */
.trace-result {
    animation: fadeIn 0.3s ease;
}

.error-message {
    padding: 15px;
    margin-top: 15px;
    background: var(--bg-color);
    color: var(--error-color);
    border-radius: 12px;
    box-shadow:
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}

.info-disclaimer {
    padding: 10px 15px;
    margin-top: 10px;
    margin-bottom: 15px;
    background: var(--bg-color);
    border-radius: 10px;
    border-left: 3px solid var(--accent-color);
    box-shadow:
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
}

.info-disclaimer small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.subsection-title {
    font-size: 1rem;
    margin-top: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
}

.trace-result .subsection-title:first-of-type {
    margin-top: 15px;
}

/* Disabled button state */
.trace-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 40px 30px 20px;
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow:
        9px 9px 16px var(--shadow-dark),
        -9px -9px 16px var(--shadow-light);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    padding: 20px;
    background: var(--bg-color);
    border-radius: 15px;
    box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
    background: linear-gradient(135deg, var(--accent-color), #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--shadow-dark);
    margin-top: 20px;
}

.social-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--bg-color);
    color: #7f8c8d;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow:
        4px 4px 8px var(--shadow-dark),
        -4px -4px 8px var(--shadow-light);
    width: 36px;
    height: 36px;
}

.social-btn:hover {
    color: #3498db;
    box-shadow:
        2px 2px 6px var(--shadow-dark),
        -2px -2px 6px var(--shadow-light);
    transform: translateY(-1px);
}

.social-btn:active {
    box-shadow:
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
    transform: translateY(0);
}

.instagram-btn svg {
    width: 20px;
    height: 20px;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-style: italic;
    margin-top: 10px;
}

/* Footer Branding */
.footer-branding-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.built-by-label {
    font-size: 0.75rem;
    color: #9ca3af;
    opacity: 0.6;
}

.kodefoundry-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.kodefoundry-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.kodefoundry-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.kodefoundry-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: #d1d5db;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.kodefoundry-link:hover .kodefoundry-text {
    color: #ffffff;
}

.brand-separator {
    color: #6b7280;
    font-size: 0.9rem;
    user-select: none;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.3s ease;
    padding: 2px;
    border-radius: 4px;
}

.instagram-link:hover {
    color: #ec4899;
    transform: scale(1.1);
}

.instagram-link svg {
    width: 14px;
    height: 14px;
}

/* Responsive adjustments for branding */
@media (max-width: 640px) {
    .footer-branding-container {
        flex-direction: column;
        gap: 16px;
    }

    .footer-divider {
        width: 40px;
        height: 1px;
    }
}

/* Blog Styles */
.blog-main {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.blog-post {
    margin-bottom: 0;
}

.blog-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-color);
    box-shadow:
        0 2px 4px var(--shadow-dark),
        0 -1px 2px var(--shadow-light);
}

.blog-date,
.blog-category {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.blog-content {
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-content p {
    margin-bottom: 20px;
    font-size: 1rem;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.blog-content h4 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.blog-content ul,
.blog-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.blog-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.blog-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--shadow-dark);
}

.comparison-table th {
    background: var(--bg-color);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table td {
    color: var(--text-primary);
    font-size: 0.95rem;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .ad-side {
        width: 100%;
        min-height: 100px;
        margin: 20px 0;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav {
        flex-wrap: wrap;
        width: 100%;
    }

    .nav-link {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .input-group {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 300px;
    }

    .ad-top,
    .ad-bottom {
        height: auto;
        padding: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .header {
        padding: 20px;
    }

    .ip-display {
        font-size: 1.5rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .footer {
        padding: 20px 15px 15px;
    }

    .footer-heading {
        font-size: 1rem;
    }

    .footer-description {
        font-size: 0.8rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .blog-title {
        font-size: 1.4rem;
    }

    .blog-content h3 {
        font-size: 1.2rem;
    }

    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px;
    }
}
