@media (max-width: 600px) {
    .card, .card * {
        font-size: 1.75rem !important;
        line-height: 1.7 !important;
    }
    label {
        font-size: 1.75rem !important;
    }
    .instructivo {
        font-size: 0.9rem !important;
    }
}
/* Tooltips personalizados para iconos de categoría */
.icon-btn {
    position: relative;
}

/* Tooltip hidden by default */
.icon-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: 110%;
    transform: translateX(-50%) scale(0.95);
    background: rgba(16,35,47,0.92);
    color: #CFEAFF;
    padding: 0.45rem 0.9rem;
    border-radius: 16px;
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16,159,255,0.07);
    border: 1px solid #3CA6FF;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s, transform 0.22s;
    z-index: 10;
}

/* Tooltip visible on hover */
.icon-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    background: rgba(16,35,47,0.95);
    box-shadow: 0 4px 12px rgba(16,159,255,0.10);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0A192F;
    color: #CBD2D9;
    min-height: 100vh;
    padding: 2rem 1rem;
    overflow-x: hidden;
    line-height: 1.3;
}
.icon-btn {
    background: #16232f;
    border: 2px solid #109FFF;
    padding: 0.7rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
.card {
    background: rgba(16, 35, 47, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(75, 135, 177, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
    max-width: 100%;
}
/* Iconos SVG en los botones de categoría */
/* Iconos SVG en los botones de categoría */
.icon-btn svg {
    width: 48px;
    height: 48px;
    display: block;
    stroke: #fff !important;
    stroke-width: 1.5 !important;
    filter: drop-shadow(0 2px 6px rgba(16,159,255,0.18));
}
.icon-btn.active svg {
    stroke: #64C1FF !important;
    stroke-width: 2 !important;
    filter: drop-shadow(0 2px 8px rgba(100,193,255,0.25));
}
}
.card {
    background: rgba(16, 35, 47, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(75, 135, 177, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
    max-width: 100%;
}
.category-icons {
    display: flex;
    gap: 2.2rem;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
}
.title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #109FFF, #64C1FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 4px 20px rgba(16, 159, 255, 0.3);
}
.instructivo {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.2rem;
    color: #CBD2D9;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.3;
    background: none;
    border-radius: 0;
    padding: 0;
}
label {
    color: #B9E2FF;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}
input, select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1rem;
    border: 2px solid #109FFF;
    border-radius: 12px;
    background: #F3F8FF;
    color: #0A192F;
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: #64C1FF;
    box-shadow: 0 0 0 3px rgba(16, 159, 255, 0.15);
}
.toggle-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #109FFF, #4493FF);
    color: white;
    border: none;
    border-radius: 50%;
    padding: 0.8rem;
    margin: 0 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(16, 159, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    /* Centrado vertical extra */
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}
.convert-btn {
    width: 100%;
    padding: 1rem 0;
    background: linear-gradient(135deg, #109FFF, #4493FF);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 8px 24px rgba(16, 159, 255, 0.08);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
}
.convert-btn::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;
}
.convert-btn:hover::before {
    left: 100%;
}
.convert-btn:hover {
    background: linear-gradient(135deg, #64C1FF, #109FFF);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(16, 159, 255, 0.2);
}
.result-box {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: #D4EDDA;
    border-radius: 14px;
    border: 1px solid #28A745;
    text-align: center;
    font-size: 1.3rem;
    color: #218838;
    font-weight: 600;
    min-height: 2.5rem;
}
.text-red-500 {
    color: #F87171 !important;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (max-width: 700px) {
    .container {
        padding: 1.2rem;
    }
    .card {
        padding: 1.2rem 0.7rem;
    }
    .title {
        font-size: 2rem;
    }
}
@media (max-width: 768px) {
    .container {
        max-width: 98vw;
    }
}
@media (max-width: 1400px) {
  .container {
    max-width: 98vw;
    padding-left: 1.5vw;
    padding-right: 1.5vw;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 100vw;
    padding-left: 2vw;
    padding-right: 2vw;
  }
  .card {
    padding: 1.5rem 0.7rem;
    border-radius: 18px;
  }
  .title {
    font-size: 2.2rem;
  }
}
/* --- SIEMPRE AL FINAL: PRIORIDAD MÓVIL --- */
@media (max-width: 600px) {
  html, body {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .container {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }
  .card {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}
#input-value {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Eliminar duplicados: dejar solo el tooltip moderno para .toggle-btn[title] */
.toggle-btn[title]:hover::after,
.toggle-btn[title]::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(0.5rem) scale(1);
    background: rgba(16,35,47,0.95);
    color: #CFEAFF;
    padding: 0.45rem 0.9rem;
    border-radius: 16px;
    font-size: 0.98rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16,159,255,0.10);
    border: 1px solid #3CA6FF;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.22s, transform 0.22s;
}
.toggle-btn[title]:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0.5rem) scale(1);
    pointer-events: none;
}
@media (min-width: 900px) {
  .container {
    max-width: 700px;
    padding-left: 0;
    padding-right: 0;
  }
}
@media (max-width: 600px) {
  html, body {
    overflow-x: hidden !important;
  }
    .container {
        display: block !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }
    .card {
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
  .card, .card * {
    font-size: 1.35rem !important;
    line-height: 1.6 !important;
  }
  label {
    font-size: 1.35rem !important;
  }
  input, select {
    font-size: 1.25rem !important;
    padding: 1.1rem 1rem !important;
  }
}
