/* IP History Styles */
.ip-history-section {
    margin: 2rem 0;
}

.ip-history-container {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 22px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
}

/* Dark Theme Support - Homepage */
body.home-ipfirst .ip-history-container {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.ip-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}

body.home-ipfirst .ip-history-header {
    border-bottom: 2px solid rgba(138, 125, 255, 0.25);
}

.ip-history-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.home-ipfirst .ip-history-title {
    color: rgba(255, 255, 255, 0.92);
}

.ip-history-clear {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ip-history-clear:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

#ip-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

body.home-ipfirst .history-empty {
    color: rgba(255, 255, 255, 0.66);
}

.history-empty p:first-child {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.history-empty-text {
    font-size: 0.9rem;
    color: #94a3b8;
}

body.home-ipfirst .history-empty-text {
    color: rgba(255, 255, 255, 0.48);
}

.history-item {
    background: linear-gradient(165deg, #eef2ff 0%, #fdf4ff 100%);
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-left: 3px solid #6366f1;
    transition: all 0.2s;
}

body.home-ipfirst .history-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(138, 125, 255, 0.2);
    border-left: 3px solid #8a7dff;
}

.history-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-left-color: #4f46e5;
}

body.home-ipfirst .history-item:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(138, 125, 255, 0.3);
    border-left-color: #30d7ff;
}

.history-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.history-ip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.history-ip strong {
    font-family: 'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
}

body.home-ipfirst .history-ip strong {
    color: rgba(255, 255, 255, 0.95);
}

.history-ipv6 {
    font-family: 'JetBrains Mono', 'Fira Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

body.home-ipfirst .history-ipv6 {
    color: #30d7ff;
    background: rgba(48, 215, 255, 0.15);
}

.history-location,
.history-isp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475467;
}

body.home-ipfirst .history-location,
body.home-ipfirst .history-isp {
    color: rgba(255, 255, 255, 0.76);
}

.history-icon {
    font-size: 1rem;
}

.history-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
}

body.home-ipfirst .history-meta {
    border-top: 1px solid rgba(138, 125, 255, 0.15);
}

.history-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

body.home-ipfirst .history-date {
    color: rgba(255, 255, 255, 0.48);
}

.history-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

body.home-ipfirst .history-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.history-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ip-history-container {
        padding: 1rem;
    }
    
    .ip-history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .ip-history-clear {
        width: 100%;
    }
    
    .history-ip {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
