* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #72edf2 10%, #5151e5 100%);
    color: #162033;
    font-family: Arial, "Noto Sans KR", "Malgun Gothic", sans-serif;
    line-height: 1.65;
}

.container {
    width: min(920px, calc(100% - 32px));
    margin: 24px auto;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(22, 32, 51, 0.08);
}

header .container {
    margin-top: 32px;
}

footer .container {
    margin-bottom: 32px;
    padding: 18px 28px;
}

.hero {
    display: block;
}

.eyebrow {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0 0 12px;
    color: #111827;
    line-height: 1.3;
    letter-spacing: 0;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    margin-top: 28px;
    font-size: 1.45rem;
}

h3 {
    margin-top: 20px;
    font-size: 1.12rem;
}

p {
    margin: 0 0 14px;
}

.lead {
    max-width: 640px;
    color: #4b5563;
    font-size: 1.08rem;
}

.hero-image {
    display: block;
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1;
    object-fit: contain;
    margin: 0 auto 24px;
}

.result-card,
.answer-box {
    margin-top: 24px;
    padding: 22px;
    background: #f8fafc;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
}

.summary-box {
    margin-top: 0;
}

.tab-section {
    margin-top: 24px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

.tab-button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
}

.tab-button.active,
.tab-button[aria-selected="true"] {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
}

.tab-button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.32);
    outline-offset: 2px;
}

.tab-panel {
    padding: 20px;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #f8fafc;
}

.tab-panel h3 {
    margin-top: 0;
}

.result-box {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
}

.result-label {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 700;
}

#ip-address {
    margin-top: 0;
    color: #0f766e;
    font-size: 2.35rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.2;
}

#country-message,
#inner-ip {
    color: #374151;
    word-break: break-word;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

#copy-button,
#back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #0f766e;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

#copy-button {
    background: #2563eb;
}

#copy-button:hover {
    background: #1d4ed8;
}

#back-button:hover {
    background: #115e59;
}

#copy-button:focus-visible,
#back-button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.32);
    outline-offset: 2px;
}

.copy-message {
    min-height: 22px;
    margin: 8px 0 0;
    color: #0f766e;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.ad-section {
    min-height: 90px;
    margin: 16px auto 24px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
    overflow: visible;
}

.ad-section .adsbygoogle {
    display: block;
    width: 100%;
    min-width: 250px;
    min-height: 90px;
}

.info-section {
    text-align: left;
}

.info-section ul {
    margin: 0 0 18px 20px;
    padding: 0;
}

.info-section li {
    margin-bottom: 8px;
}

code {
    padding: 2px 5px;
    background: #eef2f7;
    border-radius: 4px;
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.95em;
}

.comparison-table {
    width: 100%;
    margin: 16px 0 22px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.comparison-table th {
    background: #f1f5f9;
    color: #111827;
}

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

footer p {
    margin: 0;
    color: #4b5563;
    font-size: 0.92rem;
    text-align: center;
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 20px, 920px);
        margin: 12px auto;
        padding: 20px;
    }

    .hero-image {
        max-width: 160px;
        justify-self: center;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    h1 {
        font-size: 1.75rem;
    }

    #ip-address {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .lead {
        font-size: 1rem;
    }
}
