* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    text-align: center;
    width: 100%;
}

h1 {
    color: white;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: #333;
    margin: 20px 0 30px;
}

.ip-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.ip-box {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 45%;
    min-width: 300px;
    text-align: center;
}

.ip-box h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.5rem;
}

.ip-box p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    word-break: break-all;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.ip-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.ip-display span {
    font-size: 1.1rem;
    color: #333;
    word-break: break-all;
}

h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

h3 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

h4 {
    color: #4a5568;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    word-break: break-all;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.copy-btn {
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background-color: #218838;
}

.detail-btn {
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.detail-btn:hover {
    background-color: #0056b3;
}

.detail-btn.active {
    background-color: #0056b3;
}

.detail-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.refresh-btn {
    background: #48bb78;
    color: white;
    margin: 1rem 0 2rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.refresh-btn:hover {
    background: #38a169;
}

.ip-details {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.detail-section {
    margin-bottom: 2rem;
    text-align: left;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.security-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    background: #e2e8f0;
    color: #4a5568;
}

.badge.active {
    background: #f56565;
    color: white;
}

.badge.safe {
    background: #48bb78;
    color: white;
}

#ipv4-location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.location-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.location-item strong {
    color: #2d3748;
    display: block;
    margin-bottom: 0.3rem;
}

.table-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    padding: 20px;
    overflow-x: auto;
}

.info-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.info-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

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

.info-table td:first-child {
    font-weight: 600;
    color: #444;
    width: 180px;
}

.info-table td:last-child {
    color: #666;
}

.info-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.true-value {
    color: #dc3545;
    font-weight: 600;
}

.false-value {
    color: #28a745;
    font-weight: 600;
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.copy-btn, .detail-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    flex: 1;
}

.copy-btn {
    background-color: #4CAF50;
    color: white;
}

.copy-btn:hover {
    background-color: #45a049;
}

.detail-btn {
    background-color: #2196F3;
    color: white;
}

.detail-btn:hover {
    background-color: #1976D2;
}

.detail-btn.active {
    background-color: #1565C0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.header h1 {
    margin: 0;
}

.search-container {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1;
}

.search-container input {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    width: 250px;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #007bff;
}

.search-container .search-btn {
    padding: 8px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.search-container .search-btn:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .search-container {
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }

    .search-container input {
        width: 60%;
    }

    h1 {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .ip-header {
        flex-direction: column;
        align-items: center;
    }
    
    .ip-box {
        width: 100%;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .ip-details {
        padding: 1rem;
    }
}
