body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9fafb;
    scroll-behavior: smooth;
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0 !important;
    }
}
.main-content {
    margin-left: 240px;
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease;
}
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}
.format-option {
    transition: all 0.2s ease;
    cursor: pointer;
}
.format-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.format-option.active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}
.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    transition: width 0.5s ease;
}
.btn {
    transition: all 0.2s 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);
    }
}
.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); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.step-indicator {
    transition: all 0.3s ease;
}
.step-indicator.active {
    background-color: #3b82f6;
    color: white;
}
.step-indicator.completed {
    background-color: #10b981;
    color: white;
}
.step-line {
    transition: background-color 0.3s ease;
}
.step-line.active {
    background-color: #3b82f6;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #1f2937;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    align-items: center;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.file-item {
    transition: all 0.2s ease;
}
.file-item:hover {
    background-color: #f9fafb;
}
.file-preview {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.file-preview.show {
    max-height: 300px;
}

/* 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;
    }
}
