/* Custom Styles for File Converter Portal */

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --neon-cyan: #06b6d4;
    --neon-purple: #8b5cf6;
    --neon-pink: #ec4899;
}

* {
    box-sizing: border-box;
}

body {
    background-attachment: fixed;
}

/* Glass Morphism Effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    to {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.8);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Tabs */
.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 100px;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.2);
}

.category-tab.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border-color: var(--neon-cyan);
    color: white;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Drop Zone */
#drop-zone {
    transition: all 0.3s ease;
    cursor: pointer;
}

#drop-zone.drag-over {
    border-color: var(--neon-cyan);
    background: rgba(6, 182, 212, 0.1);
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(6, 182, 212, 0.4);
}

#drop-zone:hover {
    transform: translateY(-4px);
}

/* Format Selects */
.format-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.format-select:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.format-select option {
    background: #1e293b;
    color: white;
    padding: 0.5rem;
}

/* Convert Button */
.convert-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.convert-button:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.convert-button:active:not(.disabled) {
    transform: translateY(0);
}

.convert-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #64748b, #475569);
}

.convert-button.loading .btn-text {
    opacity: 0;
}

.convert-button.loading .btn-loader {
    display: block !important;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Download Button */
.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* File Info */
#file-info {
    animation: slide-up 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .category-tab {
        min-width: 80px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .category-tab span:last-child {
        font-size: 0.8rem;
    }
    
    #drop-zone {
        padding: 2rem 1rem;
    }
    
    .convert-button,
    .download-button {
        width: 100%;
        max-width: 300px;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0891b2, #7c3aed);
}

/* Format Icons */
.format-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.format-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Success Animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
    }
    50% {
        transform: scale(1.2) rotate(45deg);
    }
    100% {
        transform: scale(1) rotate(45deg);
    }
}

.success-checkmark {
    animation: checkmark 0.6s ease-out;
}

/* Error States */
.error-state {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.error-text {
    color: #fca5a5;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Terms Modal */
#terms-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#terms-modal .glass-card {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Custom Checkbox */
#terms-checkbox {
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

#terms-checkbox:checked {
    background-color: var(--neon-cyan);
    border-color: var(--neon-cyan);
}

#terms-checkbox:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

#terms-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.5);
}

/* Modal animations */
#terms-modal.show {
    animation: fadeIn 0.3s ease-out;
}

#terms-modal .glass-card {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}