/* Main Container */
.ip-geolocation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ip-geolocation-container h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
}

/* Form Styles */
.ip-lookup-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.ip-lookup-form form {
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .ip-lookup-form form {
        flex-direction: row;
        align-items: flex-end;
    }
}

.form-group {
    flex-grow: 1;
    margin-bottom: 15px;
}

@media (min-width: 640px) {
    .form-group {
        margin-bottom: 0;
        margin-right: 15px;
    }
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9em;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.form-submit button, 
#lookup-visitor-ip,
#try-again-button,
#copy-json-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-submit button:hover, 
#lookup-visitor-ip:hover,
#try-again-button:hover,
#copy-json-button:hover {
    background-color: #2563eb;
}

/* Visitor IP */
.visitor-ip-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.visitor-ip-info p {
    margin: 0;
    font-size: 1em;
}

.visitor-ip-info span {
    font-weight: 600;
    font-family: monospace;
}

/* Loading State */
.ip-lookup-loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.ip-lookup-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-icon {
    background-color: #fee2e2;
    color: #ef4444;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* Results Display */
.ip-result-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ip-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ip-result-header h3 {
    margin: 0 0 5px;
    font-size: 1.3em;
}

.ip-address {
    font-family: monospace;
    color: #3b82f6;
    font-weight: 600;
    margin: 0;
}

/* JSON Display */
.json-display {
    background-color: #1f2937;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    overflow: auto;
    max-height: 300px;
}

.json-display pre {
    color: #fff;
    font-family: monospace;
    white-space: pre-wrap;
    margin: 0;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    padding: 20px;
}

@media (min-width: 640px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .details-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.details-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.card-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background-color: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.card-icon svg {
    color: #3b82f6;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.card-content {
    font-size: 0.9em;
    color: #555;
}

.card-content p {
    margin: 5px 0;
}

.card-content p span:first-child {
    font-weight: 500;
    margin-right: 5px;
}

/* Map Styles */
.map-container {
    padding: 20px;
}

.map-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.ip-map {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.coordinates {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    font-size: 0.9em;
    color: #555;
}

.coordinates p {
    margin: 5px 0;
}

.coordinates p span:first-child {
    font-weight: 500;
    margin-right: 5px;
}

/* Icons */
.location-icon, .time-icon, .currency-icon, .connection-icon {
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
}

.location-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
}

.time-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

.currency-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='1' x2='12' y2='23'%3E%3C/line%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'%3E%3C/path%3E%3C/svg%3E");
}

.connection-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='2' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3C/path%3E%3C/svg%3E");
}