/* ================================
   CODETUDE IP LOCATOR - STYLES
   ================================ */

.codetude-ip-locator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 20px;
}

/* Header */
.ip-locator-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.ip-locator-header h1 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 700;
}

.ip-locator-header p {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* Search Box */
.ip-search-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ip-search-wrapper {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto 20px;
}

.ip-search-input {
    flex: 1;
    /* padding: 16px 20px; */
    /* border: 2px solid #e0e0e0; */
    /* border-radius: 12px; */
    font-size: 16px;
    transition: all 0.2s;

        padding: 12px 20px;
    border-radius: 12x !important;
    border: none;
    background: #e0e0e0;
    box-shadow: inset 2px 2px 4px #bebebe, inset -2px -2px 4px #ffffff;
    cursor: pointer;
    /* transition: all 0.2s ease; */
}

/* .ip-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
} */


.ip-search-btn {
    padding: 16px 40px;
    background: #1c2843;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
}

.ip-search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ip-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ip-search-btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ip-quick-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.ip-quick-btn {
    width: 150px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ip-quick-btn:hover {
    background: linear-gradient(135deg, #5271ff 0%, #8e51ca 100%);
    color: #ffffff;
}

/* Results Container */
.ip-results-container {
    display: none;
}

.ip-results-container.active {
    display: block;
    animation: fadeIn 0.4s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* IP Header Card */
.ip-header-card {
    background: #1c2843;
    border-radius: 16px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

 .ip-address-display {
    font-size: 12px;

   
}

.ip-header-card .ip-type-badge {
    display: inline-block;
    padding: 8px 20px;
    background: #770c0c;
    border-radius: 20px;
    font-size: 24px;
    font-weight: 600;
    margin: 10px 5px;
    backdrop-filter: blur(10px);
}

/* Info Grid */
.ip-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ip-info-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ip-info-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ip-info-card h3 .icon {
    width: 32px;
    height: 32px;
    background: #770c0c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-info-card h3 .icon svg {
    stroke: white;
}

.ip-info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.ip-info-item:last-child {
    border-bottom: none;
}

.ip-info-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.ip-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.ip-info-value.large {
    font-size: 18px;
    color: #667eea;
}

/* Map Container */
.ip-map-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ip-map-container h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ip-map-placeholder {
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #999;
    border: 2px dashed #e0e0e0;
}

.ip-map-placeholder svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Security Info */
.ip-security-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.security-status {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.security-status.safe {
    background: #e8f5e9;
    border: 1px solid #81c784;
}

.security-status.warning {
    background: #fff3e0;
    border: 1px solid #ffb74d;
}

.security-status.danger {
    background: #ffebee;
    border: 1px solid #e57373;
}

.security-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.security-status.safe .security-icon {
    background: #4caf50;
}

.security-status.warning .security-icon {
    background: #ff9800;
}

.security-status.danger .security-icon {
    background: #f44336;
}

.security-icon svg {
    stroke: white;
}

.security-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.security-content p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* History */
.ip-history-container {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ip-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.ip-history-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    transform: translateX(5px);
}

.ip-history-ip {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #667eea;
    font-size: 16px;
}

.ip-history-location {
    font-size: 14px;
    color: #666;
}

.ip-history-time {
    font-size: 12px;
    color: #999;
}

.ip-history-clear {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 15px;
}

.ip-history-clear:hover {
    background: #d32f2f;
}

/* Copy Button */
.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #667eea;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #5568d3;
    transform: scale(1.1);
}

.copy-btn.copied {
    color: #4caf50;
}

/* Loading State */
.ip-loading {
    text-align: center;
    padding: 60px 20px;
}

.ip-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.ip-loading-text {
    font-size: 18px;
    color: #666;
    font-weight: 600;
}

/* Error State */
.ip-error {
    background: #ffebee;
    border: 2px solid #e57373;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.ip-error-icon {
    width: 60px;
    height: 60px;
    background: #f44336;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.ip-error-icon svg {
    stroke: white;
}

.ip-error h3 {
    margin: 0 0 10px 0;
    color: #c62828;
}

.ip-error p {
    margin: 0;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .ip-locator-header h1 {
        font-size: 28px;
    }
    
    .ip-search-wrapper {
        flex-direction: column;
    }
    
    .ip-search-btn {
        width: 100%;
    }
    

    .ip-info-grid {
        grid-template-columns: 1fr;
    }
    
    .ip-info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .ip-info-value {
        text-align: left;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Tags */
.ip-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin: 3px;
}

.ip-tag.vpn {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffb74d;
}

.ip-tag.proxy {
    background: #fce4ec;
    color: #c2185b;
    border: 1px solid #f48fb1;
}

.ip-tag.tor {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.ip-tag.hosting {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}