* {
    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 {
    text-align: center;
    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);
}

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

.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 {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.social-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-start;
    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;
}

/* 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 {
        display: none;
    }
}

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

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

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

    .map-container {
        height: 300px;
    }

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

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

    .card {
        padding: 20px;
    }

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

    .title {
        font-size: 1.5rem;
    }
}
