/* ========================================
   SWIFTPDF - TOOL PAGES DESIGN
   Design específico para páginas de ferramentas
======================================== */

/* Layout da página de ferramenta */
.tool-page {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header da ferramenta */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.tool-header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tool-header h1 i {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-header p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Área de upload revolucionária */
.upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.upload-zone {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px dashed var(--primary);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    transform: scale(1.02);
}

.upload-zone:hover::before,
.upload-zone.dragover::before {
    opacity: 1;
}

.upload-icon {
    width: 5rem;
    height: 5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.upload-icon::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 4s linear infinite;
    opacity: 0.7;
}

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

.upload-text h3 {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-text p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Opções de conversão */
.conversion-options {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.conversion-options h3 {
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Botões modernos */
.btn-convert {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.btn-convert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.btn-convert:hover::before {
    left: 100%;
}

.btn-convert:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Status de conversão */
.conversion-status {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--success);
}

.conversion-status.error {
    border-left-color: var(--danger);
}

.conversion-status i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--success);
}

.conversion-status.error i {
    color: var(--danger);
}

/* Botão de download */
.download-btn {
    background: var(--gradient-secondary);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
}

/* Processing animation */
.processing {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* File info display */
.file-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.file-info:hover {
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
    .tool-page {
        padding-top: 100px;
    }
    
    .tool-container {
        padding: 0 1rem;
    }
    
    .tool-header h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .upload-section {
        padding: 2rem 1rem;
    }
    
    .upload-zone {
        padding: 3rem 1rem;
    }
    
    .upload-icon {
        width: 4rem;
        height: 4rem;
        font-size: 1.5rem;
    }
}

/* Estilo para inputs de arquivo ocultos */
input[type="file"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Animações de loading */
.loaded .tool-header {
    animation: fadeInUp 0.8s ease-out;
}

.loaded .upload-section {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.loaded .conversion-options {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}