/* ============================================
   HISTORY PAGE STYLES
   ============================================ */

.history-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: controlsSlideIn 0.6s ease forwards 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes controlsSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    transition: var(--transition-smooth);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-dim);
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 14px;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.clear-btn svg {
    width: 18px;
    height: 18px;
}

.clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* History List */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: listFadeIn 0.8s ease forwards 0.5s;
    opacity: 0;
}

@keyframes listFadeIn {
    to { opacity: 1; }
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: var(--transition-smooth);
    animation: itemSlideIn 0.5s ease forwards;
    opacity: 0;
    transform: translateX(-20px);
}

@keyframes itemSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.item-icon svg {
    width: 22px;
    height: 22px;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-filename {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.15rem;
}

.item-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.item-link {
    font-size: 0.8rem;
    color: var(--primary-light);
    text-decoration: none;
    font-family: 'Space Grotesk', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    transition: var(--transition-smooth);
}

.item-link:hover {
    color: var(--secondary);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.item-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.item-btn svg {
    width: 16px;
    height: 16px;
}

.item-btn:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.item-btn.copy-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.item-btn.open-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.item-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    animation: emptyFadeIn 0.8s ease forwards 0.3s;
    opacity: 0;
}

@keyframes emptyFadeIn {
    to { opacity: 1; }
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--text-dim);
}

.empty-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.empty-btn svg {
    width: 18px;
    height: 18px;
}

.empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
    }

    .item-link {
        display: none;
    }

    .history-item {
        padding: 0.75rem;
    }
}
