@tailwind base;
@tailwind components;
@tailwind utilities;

/* Tailwind Config */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .bg-gradient-blue {
        background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .transition-all {
        transition: all 300ms ease-in-out;
    }
}

/* Custom styles */
body {
    background-image: url('https://p6-flow-imagex-sign.byteimg.com/tos-cn-i-a9rns2rl98/rc/pc/super_tool/79629bb2ae634fdc9b1a42d81ebb3bf3~tplv-a9rns2rl98-image.image?lk3s=8e244e95&rcl=202603050944369501C91AEA3C02B4F337&rrcfp=f06b921b&x-expires=1775267116&x-signature=f7u6rn96xrJnstAnNlvQevgo%2FcI%3D');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.glass-effect {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.textarea-container {
    position: relative;
}

.textarea-container textarea {
    resize: none;
    font-family: inherit;
    line-height: 1.6;
}

.file-drop-area {
    border: 2px dashed #60a5fa;
    transition: all 0.3s ease;
}

.file-drop-area:hover, .file-drop-area.active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background-color: white;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.tab-btn {
    transition: all 0.3s ease;
}

.tab-btn:hover:not(.tab-active) {
    color: #60a5fa;
}

/* Loading animation */
.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 #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .textarea-container textarea {
        height: 200px;
    }
    
    .btn-icon span {
        display: none;
    }
    
    .btn-icon {
        padding: 0.5rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .glass-effect {
        padding: 1.5rem;
    }
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1d5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection styles */
::selection {
    background-color: #dbeafe;
    color: #1e40af;
}