/**
 * MyIPChecker - Production Stylesheet
 * Hand-written, modern, zero-dependency CSS optimized for core web vitals.
 * Palette: Navy #0B1220, Cyan #06B6D4, Sky #38BDF8, Slate #1E293B, Light #F8FAFC
 */

:root {
    --bg-page: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #FFFFFF;
    --bg-header: #0B1220;
    --bg-header-border: #1E293B;
    --bg-muted: #F1F5F9;
    --bg-card-hover: #F8FAFC;

    --text-main: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-white: #FFFFFF;

    --brand-primary: #06B6D4;
    --brand-primary-hover: #0891B2;
    --brand-secondary: #0B1220;
    --brand-accent: #38BDF8;

    --border-color: #E2E8F0;
    --border-focus: #06B6D4;

    --color-success: #10B981;
    --color-success-bg: #ECFDF5;
    --color-warning: #F59E0B;
    --color-warning-bg: #FFFBEB;
    --color-danger: #EF4444;
    --color-danger-bg: #FEF2F2;

    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px -2px rgba(11, 18, 32, 0.06);

    --transition: all 0.2s ease-in-out;
}

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

html {
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-page);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.main-content {
    flex: 1 0 auto;
    padding-bottom: 4rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; margin-top: 2rem; margin-bottom: 0.875rem; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }
p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--brand-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--brand-primary-hover); text-decoration: underline; }
code, pre { font-family: var(--font-mono); }

/* Header & Navigation */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--bg-header-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none !important;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
}

.brand-name .accent, .footer-brand-name .accent {
    color: var(--brand-primary);
}

.primary-nav .nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    color: #CBD5E1;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-white);
    text-decoration: none;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--brand-primary);
    border-radius: 2px;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #CBD5E1;
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition);
}

/* Breadcrumbs */
.breadcrumb-wrapper {
    padding-top: 1.25rem;
    padding-bottom: 0.25rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--text-light);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--brand-primary);
}

/* Hero & Tool Showcase */
.hero-section {
    background: linear-gradient(180deg, #0B1220 0%, #111C30 100%);
    color: var(--text-white);
    padding: 3rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #38BDF8;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.875rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
}

.hero-title {
    color: var(--text-white);
    font-size: 2.5rem;
    margin-bottom: 0.875rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: #94A3B8;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Tool Main Card */
.tool-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}

.ip-display-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    background: #0B1220;
    border: 1px solid #1E293B;
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
}

.ip-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94A3B8;
    margin-bottom: 0.25rem;
}

.ip-value-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ip-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    word-break: break-all;
}

.ip-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.badge-cyan { background: rgba(6, 182, 212, 0.15); color: #06B6D4; border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--color-warning-bg); color: #B45309; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-stack);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none !important;
}

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

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

.btn-outline {
    background-color: transparent;
    border-color: #334155;
    color: #F1F5F9;
}

.btn-outline:hover {
    background-color: #1E293B;
    border-color: #475569;
}

.btn-outline-dark {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-outline-dark:hover {
    background-color: var(--bg-muted);
    border-color: #CBD5E1;
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.4rem 0.85rem;
}

/* Tool Grid / Detail Table */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #FFFFFF;
}

.detail-table th, .detail-table td {
    padding: 0.875rem 1.15rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

.detail-table tr:last-child th, .detail-table tr:last-child td {
    border-bottom: none;
}

.detail-table th {
    background-color: var(--bg-muted);
    color: var(--text-muted);
    font-weight: 600;
    width: 38%;
}

.detail-table td {
    color: var(--text-main);
    font-weight: 500;
}

/* Map Embed Container */
.map-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.map-header {
    padding: 0.875rem 1.15rem;
    background-color: var(--bg-muted);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.map-header-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background-color: #E2E8F0;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Input Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #FFFFFF;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

/* Comprehensive Guide / Content Section */
.content-wrapper {
    margin-top: 3.5rem;
}

.content-article {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.content-article h2 {
    border-bottom: 2px solid var(--bg-muted);
    padding-bottom: 0.5rem;
}

.content-article ul, .content-article ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.content-article li {
    margin-bottom: 0.5rem;
}

/* Comparison Table */
.data-table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th, .data-table td {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.data-table th {
    background-color: var(--bg-header);
    color: var(--text-white);
    font-weight: 600;
}

.data-table tr:nth-child(even) {
    background-color: var(--bg-muted);
}

/* FAQs Accordion */
.faq-section {
    margin-top: 2rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.875rem;
    overflow: hidden;
    background-color: #FFFFFF;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: var(--bg-muted);
}

.faq-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 1.25rem;
    color: var(--brand-primary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 0 1.25rem 1.25rem;
    max-height: 500px;
}

/* Related Tools & Articles Grid */
.cross-links-section {
    margin-top: 3.5rem;
}

.cross-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.cross-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cross-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
    text-decoration: none;
}

.cross-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.cross-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-grow: 1;
}

/* Ad Placement Containers */
.ad-placement {
    margin: 2rem auto;
    text-align: center;
    max-width: 970px;
    overflow: hidden;
}

/* Footer */
.site-footer {
    background-color: var(--bg-header);
    color: #94A3B8;
    border-top: 1px solid var(--bg-header-border);
    margin-top: auto;
}

.footer-top {
    padding: 4rem 1.25rem 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1fr;
    gap: 2.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-white);
}

.footer-desc {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-sm);
    color: #38BDF8;
    font-size: 0.8125rem;
    font-weight: 500;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--text-white);
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #1E293B;
    padding: 1.5rem 0;
    font-size: 0.8125rem;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-bottom-links a {
    color: #94A3B8;
}

.footer-bottom-links a:hover {
    color: var(--text-white);
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0B1220;
    border-top: 2px solid var(--brand-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 1rem 0;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1 1 500px;
    font-size: 0.875rem;
    color: #CBD5E1;
}

.cookie-text a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Alert Notification Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.alert-success {
    background-color: var(--color-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065F46;
}

.alert-danger {
    background-color: var(--color-danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991B1B;
}

.alert-warning {
    background-color: var(--color-warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400E;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.25);
    color: #0E7490;
}

/* Contact Page Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.contact-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
}

.contact-info-list {
    list-style: none;
    margin: 1.5rem 0 0;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.contact-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Legal Documents */
.legal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* 404 Error Styles */
.error-box {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--brand-primary);
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.45rem; }

    .mobile-nav-toggle {
        display: block;
    }

    .primary-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-header);
        border-bottom: 1px solid var(--bg-header-border);
        padding: 1.5rem;
    }

    .primary-nav.nav-open {
        display: block;
    }

    .primary-nav .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ip-display-box {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .content-article {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
