/* ===========================
   QONVERTIR - Estilos Compartidos Herramientas
   Diseño consistente para todas las tools
   =========================== */

/* Reset y Variables (igual que landing) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    
    /* Colores por herramienta */
    --qr-color: #10B981;
    --pdf-color: #EF4444;
    --compress-color: #06B6D4;
    --convert-color: #F59E0B;
    --password-color: #8B5CF6;
    --counter-color: #6366F1;
    
    /* Neutrales */
    --background: #FFFFFF;
    --surface: #F9FAFB;
    --border: #E5E7EB;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    
    /* Estados */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ===========================
   HEADER (igual que landing)
   =========================== */

.header {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-bottom: 4px solid var(--primary);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.by-khabala {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: -5px;
}

/* ===========================
   NAVEGACIÓN / BREADCRUMB
   =========================== */

.breadcrumb {
    padding: 20px 0;
    background: var(--surface);
}

.breadcrumb-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-secondary);
}

/* ===========================
   CONTENIDO PRINCIPAL
   =========================== */

.main-content {
    padding: 60px 0;
    flex: 1;
}

.tool-header {
    text-align: center;
    margin-bottom: 50px;
}

.tool-icon-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.tool-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.tool-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   TARJETA DE HERRAMIENTA
   =========================== */

.tool-card-container {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

/* ===========================
   FORMULARIOS Y CONTROLES
   =========================== */

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Checkbox personalizado */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label {
    font-size: 15px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

/* Slider personalizado */
.slider-group {
    margin-bottom: 25px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.slider-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.slider-input {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    background: var(--border);
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.slider-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

/* ===========================
   BOTONES
   =========================== */

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-block {
    width: 100%;
}

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

/* ===========================
   RESULTADO / OUTPUT
   =========================== */

.result-container {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-display {
    background: white;
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    font-size: 18px;
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-align: center;
}

.result-empty {
    color: var(--text-secondary);
    font-style: italic;
}

/* ===========================
   ALERTAS / NOTIFICACIONES
   =========================== */

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: #065f46;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: #991b1b;
}

.alert-info {
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary-dark);
}

/* ===========================
   FOOTER (igual que landing)
   =========================== */

.footer {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-top: 4px solid var(--primary);
    padding: 30px 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 5px 0;
}

.footer strong {
    color: var(--primary);
    font-weight: 600;
}

.footer-tagline {
    font-style: italic;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 5px;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .tool-title {
        font-size: 28px;
    }
    
    .tool-card-container {
        padding: 25px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tool-icon-large {
        width: 80px;
        height: 80px;
    }
    
    .tool-title {
        font-size: 24px;
    }
    
    .tool-card-container {
        padding: 20px;
    }
}

/* ===========================
   SISTEMA DE NOTIFICACIONES PERSONALIZADO
   =========================== */

/* Overlay oscuro de fondo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

/* Modal principal */
.custom-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* Header del modal */
.modal-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.modal-icon.error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.modal-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.modal-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.modal-icon.info {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Contenido del modal */
.modal-body {
    padding: 24px;
}

.modal-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer del modal */
.modal-footer {
    padding: 16px 24px;
    background: var(--surface);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: var(--primary);
    color: white;
}

.modal-btn-primary:hover {
    background: var(--primary-dark);
}

.modal-btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.modal-btn-secondary:hover {
    border-color: var(--primary);
}

/* Toast notifications (pequeñas notificaciones) */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: #10B981;
}

.toast.error {
    border-left-color: #EF4444;
}

.toast.warning {
    border-left-color: #F59E0B;
}

.toast-icon {
    font-size: 24px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--surface);
}

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

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive para modales */
@media (max-width: 480px) {
    .custom-modal {
        max-width: 95%;
    }
    
    .toast {
        min-width: auto;
        max-width: calc(100vw - 40px);
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
}

/* ===========================
   RESPONSIVE DESIGN - MOBILE FIRST
   =========================== */

/* Tablet - 768px a 1023px */
@media (max-width: 1023px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .tool-header {
        text-align: center;
    }
    
    .tool-icon-large {
        margin: 0 auto 20px;
    }
}

/* Mobile - hasta 767px */
@media (max-width: 767px) {
    /* Header */
    .header {
        padding: 15px 0;
    }
    
    .logo {
        gap: 10px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .by-khabala {
        font-size: 10px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        padding: 10px 0;
    }
    
    .breadcrumb-links {
        font-size: 13px;
    }
    
    /* Main Content */
    .main-content {
        padding: 20px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Tool Header */
    .tool-header {
        margin-bottom: 20px;
    }
    
    .tool-icon-large {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .tool-icon-large svg {
        width: 35px;
        height: 35px;
    }
    
    .tool-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .tool-description {
        font-size: 14px;
    }
    
    /* Tool Card */
    .tool-card-container {
        padding: 20px 15px;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px; /* Evita zoom en iOS */
        padding: 12px 15px;
    }
    
    .form-textarea {
        min-height: 120px;
    }
    
    /* Botones - MÁS GRANDES para touch */
    .btn {
        padding: 14px 20px;
        font-size: 15px;
        width: 100%; /* Full width en móvil */
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Sliders */
    .slider-group {
        margin-bottom: 20px;
    }
    
    .slider-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .slider-input {
        height: 40px; /* Más alto para tocar */
    }
    
    /* Footer */
    .footer {
        padding: 20px 0;
        font-size: 13px;
    }
    
    .footer-tagline {
        font-size: 11px;
    }
}

/* Mobile Small - hasta 480px */
@media (max-width: 480px) {
    /* Header más compacto */
    .header {
        padding: 12px 0;
    }
    
    .logo h1 {
        font-size: 16px;
    }
    
    /* Tool Header */
    .tool-title {
        font-size: 20px;
    }
    
    .tool-description {
        font-size: 13px;
    }
    
    /* Card más compacto */
    .tool-card-container {
        padding: 15px 12px;
        border-radius: 8px;
    }
    
    /* Botones apilados */
    .btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    /* Info boxes */
    .info-box {
        padding: 15px;
        font-size: 14px;
    }
    
    .info-box h3 {
        font-size: 16px;
    }
    
    .info-box ul {
        font-size: 13px;
        margin-left: 15px;
    }
}

/* Landscape mobile - altura pequeña */
@media (max-height: 600px) and (orientation: landscape) {
    .tool-header {
        margin-bottom: 15px;
    }
    
    .tool-icon-large {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .main-content {
        padding: 15px 0;
    }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    /* Botones y elementos interactivos más grandes */
    .btn,
    button,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px; /* Tamaño mínimo recomendado por Apple */
    }
    
    /* Checkboxes y radios más grandes */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
    }
    
    /* Links más espaciados */
    a {
        padding: 8px 4px;
    }
}

