@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body,
input,
button,
select,
textarea {
    font-family: 'Roboto', sans-serif;
}

body {
    user-select: none;
    -webkit-user-select: none;
    /* Evita la selección accidental de texto en iOS/Safari */
    -moz-user-select: none;
    -ms-user-select: none;
    background-color: #F5F5F5 !important;
}

/* Habilitar selección de texto únicamente en campos de entrada y elementos editables */
input,
textarea,
select,
[contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

#mobile-frame {
    max-width: 430px;
    margin: 0 auto;
    height: 100dvh;
    min-height: 100dvh;
    background: #f3f4f6;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-gradient {
    background: linear-gradient(180deg, #306859 0%, #FFFFFF 100%);
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #9ca3af;
}

#toast {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #858585d1;
    color: white;
    padding: 7px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 300;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

#toast.show {
    opacity: 1;
}

/* ── Admin section ────────────────────────────────────────────────────────── */
.admin-section {
    position: relative;
    border: 1.5px dashed #F59E0B;
    border-radius: 16px;
    padding: 12px 12px 4px;
    background: #FFFDF0;
    margin-bottom: 12px;
}

.admin-section::before {
    content: 'ADMIN';
    position: absolute;
    top: -10px;
    left: 12px;
    background: #F59E0B;
    color: white;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 20px;
}

/* --- SKELETON SCREEN (CARGA PREMIUM) --- */
.skeleton-pulse {
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 4px;
}

/* Shimmer translúcido premium para temas oscuros/translúcidos */
.skeleton-pulse-dark {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite linear;
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Skeleton específico de tarjeta */
.skeleton-card {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.04) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* --- REGULAR MUSIC PLAYER (GLOBAL) --- */
.music-player {
    /* Configurable CSS variables per view */
    --player-bg: rgb(245 245 245 / 4%);
    --player-height: 25px;
    --player-bottom: 59px;
    --player-btn-color: #467568;
    --player-btn-hover-color: #306859;
    --player-text-size: 8.5px;
    --player-text-color: #777777;
    --player-text-weight: 500;

    position: absolute;
    bottom: var(--player-bottom);
    left: 0;
    width: 100%;
    height: var(--player-height);
    background-color: var(--player-bg);
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
    z-index: 99;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.music-btn {
    background: none;
    border: none;
    padding: 0;
    margin-right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--player-btn-color);
    width: 24px;
    height: 24px;
    transition: color 0.2s ease, transform 0.1s ease;
    outline: none;
    flex-shrink: 0;
}

.music-btn:active {
    transform: scale(0.9);
}

.music-btn:hover {
    color: var(--player-btn-hover-color);
}

.music-svg-icon {
    width: 11px;
    height: 11px;
}

.music-title-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.music-title {
    font-size: var(--player-text-size);
    font-weight: var(--player-text-weight);
    color: var(--player-text-color);
    white-space: nowrap;
    position: absolute;
    left: 0;
    display: inline-block;
    padding-left: 100%;
    will-change: transform;
    animation: music-marquee 18s linear infinite;
    animation-play-state: paused;
}

.music-player.playing .music-title {
    animation-play-state: running;
}

@keyframes music-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- INDICADOR DE LESIÓN (COMPARTIDO GLOBALMENTE) --- */
.lesion-container {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.25);
    z-index: 15;
    pointer-events: none;
    box-sizing: border-box;
}

.lesion-container .lesion-icon {
    width: 9px;
    height: 9px;
    -webkit-mask: url('svg/lesion-stat.svg') no-repeat center;
    mask: url('svg/lesion-stat.svg') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.lesion-container.amarillo .lesion-icon {
    background-color: #FBBF24; /* Amarillo */
}

.lesion-container.rojo .lesion-icon {
    background-color: #EF4444; /* Rojo */
}

/* Modificadores de tamaño para pantallas específicas si es necesario */
.lesion-container.lesion-large {
    width: 22px;
    height: 22px;
    bottom: 2px;
    right: 2px;
}
.lesion-container.lesion-large .lesion-icon {
    width: 14px;
    height: 14px;
}

.lesion-container.lesion-header {
    width: 10px;
    height: 10px;
    bottom: -1px;
    right: -1px;
}
.lesion-container.lesion-header .lesion-icon {
    width: 6.5px;
    height: 6.5px;
}