/* PDF to Text Converter - Main Styles */
.pdf-converter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.converter-header {
    text-align: center;
    margin-bottom: 40px;
}

.converter-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.converter-header .pdf-icon {
    font-size: 2.8rem;
}

.converter-header .subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Card */
.converter-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #3498db;
    border-radius: 15px;
    padding: 50px 20px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    background: #f0f7ff;
    border-color: #2980b9;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: #e3f2fd;
    border-color: #1a73e8;
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.upload-area h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.upload-hint {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 1rem;
}

.file-input {
    display: none;
}

.browse-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.browse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.file-size-limit {
    color: #95a5a6;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* File Info */
.file-info {
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.file-details {
    background: #e8f4fc;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid #3498db;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
    flex-grow: 1;
    margin-right: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.9rem;
    background: white;
    padding: 3px 10px;
    border-radius: 15px;
    margin-right: 15px;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Progress Section */
.progress-section {
    margin: 25px 0;
    animation: fadeIn 0.3s ease;
}

.progress-bar {
    height: 10px;
    background: #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00b09b, #96c93d);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Controls Section */
.controls-section {
    margin: 30px 0;
}

.buttons-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.convert-btn {
    flex: 1;
    max-width: 300px;
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 55px;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 176, 155, 0.3);
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #95a5a6;
}

.convert-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.clear-btn {
    padding: 15px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover:not(:disabled) {
    background: #c0392b;
    transform: translateY(-2px);
}

.clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Output Section */
.output-section {
    margin-top: 40px;
    animation: fadeIn 0.5s ease;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.output-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin: 0;
}

.output-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Output Container */
.output-container {
    position: relative;
    min-height: 300px;
    border: 2px solid #dfe6e9;
    border-radius: 10px;
    background: #f8f9fa;
    overflow: hidden;
}

.output-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #b2bec3;
    pointer-events: none;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.text-output {
    width: 100%;
    height: 300px;
    padding: 20px;
    border: none;
    background: transparent;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c3e50;
    outline: none;
    display: none;
}

.text-output:focus {
    outline: none;
}

/* Output Stats */
.output-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 12px 20px;
    background: #f1f8e9;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #33691e;
    animation: fadeIn 0.3s ease;
}

/* Footer */
.converter-footer {
    margin-top: 30px;
    text-align: center;
}

.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.disclaimer {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-converter-container {
        padding: 10px;
    }
    
    .converter-card {
        padding: 25px;
    }
    
    .converter-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .buttons-group {
        flex-direction: column;
    }
    
    .convert-btn, .clear-btn {
        width: 100%;
        max-width: 100%;
    }
    
    .output-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .output-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .output-stats {
        flex-direction: column;
        gap: 5px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .converter-header h1 {
        font-size: 1.7rem;
    }
    
    .converter-card {
        padding: 20px 15px;
    }
    
    .file-details {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .file-size {
        align-self: flex-start;
        margin-right: 0;
    }
    
    .remove-file {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}