* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Paleta de colores Abry Cloud */
    --footer-dark: #001F44;
    --primary-color: #01579E;
    --primary-light: #058EC9;
    --text-dark: #163147;
    --bg-light: #F8F9FA;
    --primary-color-hover: #014a7a;
    --primary-light-hover: #0478a8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --card-bg: #ffffff;
    --text-primary: #163147;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(1, 31, 68, 0.1), 0 2px 4px -1px rgba(1, 31, 68, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(1, 31, 68, 0.1), 0 4px 6px -2px rgba(1, 31, 68, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

/* Site Header */
.site-header {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 70px;
    width: auto;
    max-width: 280px;
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 20px;
    flex: 1;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.header-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-light);
    flex-shrink: 0;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

main {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(5, 142, 201, 0.05);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: var(--primary-light);
    background: rgba(5, 142, 201, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-light);
    margin: 0 auto 20px;
}

.upload-content h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.upload-content p {
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.file-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.file-info-display {
    margin: 30px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}

.file-icon.md {
    background: #fef3c7;
    color: #92400e;
}

.file-icon.pdf {
    background: #fee2e2;
    color: #991b1b;
}

.file-details {
    flex: 1;
}

.file-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.file-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.btn-remove {
    background: var(--error-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.action-buttons {
    text-align: center;
    margin: 30px 0;
}

.btn-convert {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-convert:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color-hover);
}

.btn-convert:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-area {
    margin-top: 30px;
    animation: slideIn 0.3s ease;
}

.success-message {
    text-align: center;
    padding: 30px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid var(--success-color);
    margin-bottom: 20px;
}

.success-icon {
    width: 48px;
    height: 48px;
    color: var(--success-color);
    margin: 0 auto 15px;
}

.success-message h3 {
    color: var(--success-color);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.success-message p {
    color: var(--text-secondary);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--success-color);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    width: 100%;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-download svg {
    width: 20px;
    height: 20px;
}

.error-message {
    background: #fef2f2;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 16px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

/* Site Footer */
.site-footer {
    background: var(--footer-dark);
    color: white;
    margin-top: auto;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

.footer-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Contador de conversiones */
.conversion-counter {
    text-align: center;
    margin: 3rem 0 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.counter-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.counter-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-light);
}

.counter-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.counter-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo-img {
        height: 60px;
    }

    .counter-number {
        font-size: 2rem;
    }

    .counter-icon {
        width: 40px;
        height: 40px;
    }

    .page-header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .file-card {
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .nav-link {
        font-size: 0.9rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}
