.circulo-autocuidado-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.circulo-autocuidado-wrapper {
    font-family: 'Arial', sans-serif;
    margin: 20px auto;
    padding: 20px;
}

.circulo-autocuidado-wrapper .game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 800px;
    width: 100%;
    text-align: center;
    position: relative;
    margin: 0 auto;
}

.circulo-autocuidado-wrapper .title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.circulo-autocuidado-wrapper .subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.circulo-autocuidado-wrapper .circle-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #333;
    background: #f0f0f0;
}

.circulo-autocuidado-wrapper .circle-container svg {
    transition: all 0.3s ease;
}

.circulo-autocuidado-wrapper .circle-container g {
    transition: all 0.3s ease;
}

.circulo-autocuidado-wrapper .level-indicator {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.circulo-autocuidado-wrapper .level-indicator.show {
    opacity: 1;
}

.circulo-autocuidado-wrapper .controls {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.circulo-autocuidado-wrapper .btn {
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.circulo-autocuidado-wrapper .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.circulo-autocuidado-wrapper .btn-secondary {
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    color: #333;
}

.circulo-autocuidado-wrapper .btn-success {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
}

.circulo-autocuidado-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.circulo-autocuidado-wrapper .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* MODAL MEJORADO - Solución al problema de scroll */
.circulo-autocuidado-wrapper .instructions {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    /* Permitir scroll en el modal */
    overflow-y: auto;
    /* Padding para que el contenido no toque los bordes */
    padding: 20px;
}

.circulo-autocuidado-wrapper .instructions.show {
    opacity: 1;
    visibility: visible;
}

.circulo-autocuidado-wrapper .instructions-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    text-align: left;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    /* Importante: permitir que el contenido se ajuste automáticamente */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    /* Centrar el modal */
    margin: auto;
    /* Posición relativa para controlar el scroll interno */
    position: relative;
}

.circulo-autocuidado-wrapper .instructions h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.6em;
    /* Sticky header para que siempre sea visible */
    position: sticky;
    top: -30px;
    background: white;
    padding: 15px 0;
    z-index: 1;
    border-bottom: 2px solid #f0f0f0;
}

.circulo-autocuidado-wrapper .instructions ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.circulo-autocuidado-wrapper .instructions li {
    margin: 12px 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 14px;
    line-height: 1.4;
}

.circulo-autocuidado-wrapper .close-instructions {
    display: block;
    margin: 20px auto 0;
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    /* Sticky button para que siempre sea accesible */
    position: sticky;
    bottom: -30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.circulo-autocuidado-wrapper .close-instructions:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.circulo-autocuidado-wrapper .progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.circulo-autocuidado-wrapper .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.circulo-autocuidado-wrapper .aspects-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.circulo-autocuidado-wrapper .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.9);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.circulo-autocuidado-wrapper .legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #333;
}

/* Mejoras específicas para móviles */
@media (max-width: 768px) {
    .circulo-autocuidado-wrapper .circle-container {
        width: 300px;
        height: 300px;
    }
    
    .circulo-autocuidado-wrapper .title {
        font-size: 2em;
    }
    
    .circulo-autocuidado-wrapper .game-container {
        padding: 20px;
    }
    
    /* Modal más compacto en móviles */
    .circulo-autocuidado-wrapper .instructions {
        padding: 10px;
        align-items: flex-start;
    }
    
    .circulo-autocuidado-wrapper .instructions-content {
        padding: 20px;
        margin: 0;
        border-radius: 15px;
        max-height: calc(100vh - 20px);
    }
    
    .circulo-autocuidado-wrapper .instructions h3 {
        font-size: 1.4em;
        top: -20px;
        padding: 10px 0;
    }
    
    .circulo-autocuidado-wrapper .instructions li {
        padding: 10px;
        margin: 10px 0;
        font-size: 13px;
    }
    
    .circulo-autocuidado-wrapper .close-instructions {
        bottom: -20px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Mejoras adicionales para pantallas muy pequeñas */
@media (max-width: 480px) {
    .circulo-autocuidado-wrapper .instructions-content {
        padding: 15px;
        max-height: calc(100vh - 10px);
    }
    
    .circulo-autocuidado-wrapper .instructions h3 {
        font-size: 1.2em;
    }
    
    .circulo-autocuidado-wrapper .instructions li {
        font-size: 12px;
        padding: 8px;
    }
}

/* Scrollbar personalizado para mejor UX */
.circulo-autocuidado-wrapper .instructions-content::-webkit-scrollbar {
    width: 6px;
}

.circulo-autocuidado-wrapper .instructions-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.circulo-autocuidado-wrapper .instructions-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.circulo-autocuidado-wrapper .instructions-content::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}