/* 自定义样式 */
.drag-over {
    @apply border-blue-400 bg-blue-50;
}

.file-item {
    @apply flex items-center justify-between p-4 bg-gray-50 rounded-lg border;
}

.file-item.uploading {
    @apply bg-blue-50 border-blue-200;
}

.file-item.completed {
    @apply bg-green-50 border-green-200;
}

.file-item.error {
    @apply bg-red-50 border-red-200;
}

.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
    @apply bg-gradient-to-r from-blue-500 to-purple-600 h-2 rounded-full transition-all duration-300;
}

/* 按钮动画 */
.btn-hover {
    @apply transition-all duration-300 transform hover:scale-105;
}

/* 加载动画 */
.spinner {
    @apply animate-spin rounded-full h-6 w-6 border-b-2 border-blue-600;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 卡片阴影 */
.card-shadow {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 二维码样式 */
.qr-code {
    @apply mx-auto border-2 border-gray-200 rounded-lg p-2;
}

/* 代码输入框样式 */
.code-input {
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* 文件图标 */
.file-icon {
    @apply w-8 h-8 flex items-center justify-center rounded text-white text-sm font-bold;
}

.file-icon.pdf { @apply bg-red-500; }
.file-icon.doc, .file-icon.docx { @apply bg-blue-600; }
.file-icon.xls, .file-icon.xlsx { @apply bg-green-600; }
.file-icon.ppt, .file-icon.pptx { @apply bg-orange-500; }
.file-icon.jpg, .file-icon.jpeg, .file-icon.png, .file-icon.gif { @apply bg-purple-500; }
.file-icon.mp4, .file-icon.avi, .file-icon.mov { @apply bg-pink-500; }
.file-icon.mp3, .file-icon.wav { @apply bg-indigo-500; }
.file-icon.zip, .file-icon.rar { @apply bg-gray-600; }
.file-icon.default { @apply bg-gray-400; }

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        @apply px-4;
    }
    
    .hero-title {
        @apply text-3xl;
    }
    
    .upload-zone {
        @apply p-8;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .card {
        @apply bg-gray-800 border-gray-700;
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

.pulse-animation {
    animation: pulse 1.5s infinite;
}

/* 工具提示 */
.tooltip {
    @apply relative;
}

.tooltip::before {
    @apply absolute bottom-full left-1/2 transform -translate-x-1/2 bg-gray-900 text-white text-xs rounded py-1 px-2 opacity-0 pointer-events-none transition-opacity duration-300;
    content: attr(data-tooltip);
    margin-bottom: 5px;
    white-space: nowrap;
}

.tooltip:hover::before {
    @apply opacity-100;
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    @apply bg-gray-100 rounded;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    @apply bg-gray-400 rounded;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-600;
}

/* 选择框样式 */
.custom-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* 拖拽区域样式 */
#dropZone {
    transition: all 0.3s ease;
}

#dropZone.drag-over {
    border-color: #3b82f6 !important;
    background-color: #dbeafe !important;
}

/* 文件列表样式 */
.file-item-pending {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}

.file-item-uploading {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
}

.file-item-completed {
    background-color: #d1fae5;
    border: 1px solid #10b981;
}

.file-item-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
}

/* 按钮悬停效果 */
.transition-colors {
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

/* 进度条动画 */
.progress-bar {
    transition: width 0.3s ease;
}

/* 模态框动画 */
.modal-enter {
    animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    max-width: 400px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.warning {
    background-color: #f59e0b;
}

.notification.info {
    background-color: #3b82f6;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* 装饰动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-30px);
    }
    70% {
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* 展示卡片旋转效果 */
.transform {
    transition: transform 0.3s ease;
}

.hover\:rotate-0:hover {
    transform: rotate(0deg);
}

/* 二维码样式 */
#upload-qrcode, #share-qrcode {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 表单焦点样式 */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: transparent;
}

/* 禁用状态样式 */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 加载状态 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 文件图标样式 */
.fa-file {
    color: #6b7280;
}

.fa-file-text {
    color: #3b82f6;
}

.fa-file-image {
    color: #10b981;
}

.fa-file-video {
    color: #f59e0b;
}

.fa-file-audio {
    color: #8b5cf6;
}

.fa-file-archive {
    color: #ef4444;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 