/* IP查询工具样式 */
.ip-tool-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.api-selector {
    margin-bottom: 1.5rem;
}

.api-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.api-selector select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
}

.api-selector select:focus {
    border-color: #6e8efb;
}

.api-selector p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.input-group {
    display: flex;
    margin-bottom: 1.5rem;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #6e8efb;
}

.input-group button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.input-group button:hover {
    opacity: 0.9;
}

.ip-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.info-card p {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 500;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-query {
    background: #27ae60;
    color: white;
}

.btn-query:hover {
    background: #219653;
}

.btn-clear {
    background: #e74c3c;
    color: white;
}

.btn-clear:hover {
    background: #c0392b;
}

.btn-myip {
    background: #3498db;
    color: white;
}

.btn-myip:hover {
    background: #2980b9;
}

.loading {
    text-align: center;
    padding: 2rem;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.error-message {
    background: #ffecec;
    color: #e74c3c;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    display: none;
}

.solution-list {
    margin-top: 15px;
    padding-left: 20px;
}

.solution-list li {
    margin-bottom: 8px;
}

.accuracy-warning {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

/* 历史查询记录 */
.history-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.history-list {
    margin-top: 1rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.history-item:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .input-group button {
        border-radius: 5px;
    }
    
    .button-container {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .ip-info {
        grid-template-columns: 1fr;
    }
}