:root {
    --surface: #ffffff;
    --surface-muted: #f4f6fb;
    --border: #e3e8f2;
    --text-main: #1c2333;
    --text-muted: #5f6b85;
    --primary: #4caf50;
    --primary-dark: #388e3c;
    --accent: #36cfc9;
    --success: #2ecc71;
    --error: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.08);
    --gradient: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* Tool Hero Section */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: 1rem;
    margin-top: 0;
}

/* My IP Interface */
.myip-interface {
    margin-bottom: 3rem;
}

.myip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 32px;
    transition: background 0.3s ease, border 0.3s ease;
    position: relative;
}

/* IP Display Section */
.ip-display-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title-group {
    flex: 1;
    min-width: 200px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* IP Display Wrapper */
.ip-display-wrapper {
    background: var(--gradient);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.2);
}

.ip-display {
    color: #ffffff;
}

.ip-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.ip-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    word-break: break-word;
    font-family: 'Courier New', monospace;
}

.ip-type {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 500;
}

/* Content Layout Wrapper - Two Column Layout */
.content-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    align-items: start;
}

/* Info Sections Wrapper */
.info-sections-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-section {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
}

.info-section:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.08);
}

.section-header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.section-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: #ffffff;
    border-radius: 10px;
    font-size: 18px;
}

.section-title-inner {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

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

.info-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.info-item:hover {
    border-color: var(--primary);
    background: rgba(76, 175, 80, 0.02);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.08);
    transform: translateY(-2px);
}

.info-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    color: #ffffff;
    border-radius: 10px;
    font-size: 18px;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    word-break: break-word;
    line-height: 1.4;
}

.info-value:empty::before {
    content: '-';
    color: var(--text-muted);
    font-weight: 400;
}

/* Map Section */
.map-section {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
    position: sticky;
    top: 24px;
    height: fit-content;
}

.map-section:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.08);
}

.map-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 20px;
}

.google-map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    margin-top: 0;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-action:hover {
    background: rgba(76, 175, 80, 0.08);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-action i {
    font-size: 14px;
}

.btn-action.copied {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.btn-action .btn-text {
    display: inline;
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.error-message {
    margin-top: 24px;
    padding: 16px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--error);
    border-radius: 12px;
    color: var(--error);
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.error-message.show {
    display: block;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Content Section */
.content-section {
    margin-top: 3rem;
    padding-top: 2rem;
}

.content-block h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    margin-top: 32px;
}

.content-block h2:first-child {
    margin-top: 0;
}

.content-block h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 24px;
    margin-bottom: 12px;
}

.content-block p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.content-block ul,
.content-block ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.content-block li {
    margin-bottom: 10px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 16px;
}

.content-block .internal-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.content-block .internal-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-dark);
    text-decoration: none;
}

.tool-card {
    transition: all 0.2s ease;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tool-card a {
    color: var(--text-main);
    transition: color 0.2s ease;
}

.tool-card a:hover {
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .content-layout-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .map-section {
        position: static;
        order: -1;
    }
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }

    .myip-card {
        padding: 20px;
        border-radius: 16px;
    }

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

    .section-actions {
        width: 100%;
    }

    .btn-action {
        flex: 1;
    }

    .ip-display-wrapper {
        padding: 24px 16px;
    }

    .ip-value {
        font-size: 28px;
    }

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

    .info-item {
        padding: 16px;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
    }

    .info-value {
        font-size: 15px;
    }

    .google-map {
        height: 300px;
    }

    .info-section {
        padding: 20px;
    }

    .map-section {
        padding: 20px;
    }

    .section-title-inner {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .tool-hero {
        gap: 20px;
    }

    .myip-card {
        padding: 16px;
    }

    .section-title {
        font-size: 18px;
    }

    .section-subtitle {
        font-size: 13px;
    }

    .ip-display-wrapper {
        padding: 20px 12px;
    }

    .ip-value {
        font-size: 24px;
    }

    .ip-label {
        font-size: 12px;
    }

    .ip-type {
        font-size: 12px;
    }

    .btn-action {
        padding: 10px 16px;
        font-size: 13px;
    }

    .info-item {
        padding: 14px;
        gap: 12px;
    }

    .info-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 14px;
    }

    .info-value {
        font-size: 14px;
    }

    .google-map {
        height: 250px;
    }

    .info-section {
        padding: 16px;
    }

    .map-section {
        padding: 16px;
    }
}

/* Focus visible for accessibility */
.btn-action:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Loading state */
.btn-action.loading {
    position: relative;
    color: transparent;
}

.btn-action.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(28, 35, 51, 0.3);
    border-top-color: var(--text-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Smooth transitions */
.myip-card * {
    transition: opacity 0.3s ease, transform 0.2s ease;
}

