body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafb;
    scroll-behavior: smooth;
}
.main-content {
    margin-left: 240px;
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease;
}
.history-item {
    transition: all 0.2s ease;
}
.history-item:hover {
    background-color: #f9fafb;
}
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn:active {
    transform: scale(0.98);
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}
.action-btn {
    transition: all 0.2s ease;
    opacity: 0.8;
}
.action-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.action-btn:active {
    transform: scale(0.95);
}
.action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.action-btn.disabled:hover {
    transform: none;
}
.pagination-btn {
    transition: all 0.2s ease;
}
.pagination-btn:hover:not(.active) {
    background-color: #f3f4f6;
}
.pagination-btn.active {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}
.tooltip {
    position: relative;
    display: inline-block;
}
.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
}
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 20;
    min-width: 10rem;
    padding: 0.5rem 0;
}
.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    max-width: 24rem;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.notification.show {
    transform: translateX(0);
}

/* Component: tool_header */
/* 头部导航样式 */
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    width: 200px;
    margin-top: 0.5rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 20;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.nav-link.active {
    color: #2563eb; /* text-blue-600 */
    font-weight: 500;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444; /* text-red-500 */
    color: white;
    border-radius: 50%;
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 80px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 为移动设备优化的样式 */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 180px;
    }
}

/* Component: tool_side */
/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 40;
}

.sidebar-link {
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    color: #2563eb;
    background-color: #f3f4f6;
}

.sidebar-link.active {
    color: #ffffff;
    background-color: #2563eb;
}

.sidebar-link.active i {
    color: #ffffff !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
        z-index: 50;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 45;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
}
